Bug Tracker

Opened 11 years ago

Closed 11 years ago

#8210 closed bug (invalid)

Comment form not appearing

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by jitter)

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 (4)

comment:1 Changed 11 years ago by jitter

Description: modified (diff)
Owner: set to [email protected]
Status: newpending

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

comment:2 Changed 11 years ago by anonymous

I've never done this before, but try this:

http://jsfiddle.net/9bYbk/

comment:3 Changed 11 years ago by [email protected]

Status: pendingnew

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.

comment:4 Changed 11 years ago by addyosmani

Resolution: invalid
Status: newclosed

Closing as the original ticket submitter has confirmed the issue was on their end rather than with core itself.

Note: See TracTickets for help on using tickets.