Ticket #8210 (closed bug: invalid)
Comment form not appearing
| Reported by: | kmac@… | Owned by: | kmac@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | unfiled | Version: | 1.5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description (last modified by jitter) (diff)
We have a comment form on our site (amren.com). As a fig leaf, we asked that visitors click an "Agree" button to signify that they understand the rules for posting a comment. Clicking the "Agree" button reveals the comment form. The code reads:
<script type="text/javascript" charset="utf-8">
var jQuery;
(function ($) {
// show the comment form
$('#showButton').click(function () {
$('#v-form').toggle();
if ($('#v-form').is(':visible')) {
$(this).val('No thanks');
var $body = $('body'), footerPosition = $('#footer').position(), scrollPosition = $body.scrollTop() + footerPosition.top;
$('html, body').animate({scrollTop: scrollPosition}, 5000);
} else {
$(this).val('I agree');
}
});
}(jQuery));
</script>
I recently switched from jQuery 1.4.4 from the Google CDN to jQuery 1.5.0 from your CDN. We have received some complaints that clicking the "Agree" button does not reveal the comment form.
So far, there are two common user agent strings for visitors reporting this problem:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729
To be honest, I had a bit of trouble getting this "reveal" code working in the first place, but it has been working for months now. It works in my browsers, so I suspect this bug is specific to certain combinations of hardware and software, but I thought you might like to know.
Thanks!
Change History
comment:1 Changed 2 years ago by jitter
- Owner set to kmac@…
- Status changed from new to pending
- Description modified (diff)
comment:3 Changed 2 years ago by kmac@…
- Status changed from pending to new
OK, it may be an issue with the way I'm invoking the jQuery code. I just changed "(function ($)" to "$(document).ready(function()" and it now seems to be working, even with 1.5.0.
Looks as though this might be my coding error. Sorry.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project by writing a bug report.
I don't think this has got anything to do with hardware at most it's a browser specific bug. But as it's kinda difficult and time consuming to figure out what could be cause for this on a full-blown page we ask you to please submit a reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net.
So that we can investigate this issue further. Also make sure to read the link given below, in order to provide a most useful bug report.
How to report bugs