Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery .click() and alert() issues
    primarykey
    data
    text
    <p>I am new to jQuery and am having a few issues. This jsFiddle shows what I am experiencing: <a href="http://jsfiddle.net/rE2FH/5/" rel="nofollow noreferrer">http://jsfiddle.net/rE2FH/5/</a> Note how the button does nothing.</p> <p>What I am trying to do is set a click listener to the button and have it do an alert();. However, the neither the click event or the alert() is working.</p> <p>I have tried the click event as .click(), .on(), .delegate(), and .live() none of which seem to work. As for the alert, I cannot find anything other than the equivalent to "It automagically works if you do 'alert([sting]);'!" I am aware the .click() is for 1.7+, .live() is depreciated and even then .delegate() is preferred over it.</p> <p>In my current project I am using jsp with the script <code> &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"&gt;&lt;/script&gt;</code> HOWEVER, it does not work in the jsFiddle either. This version works fine on some of our other pages (alert and .click events), but for some reason the one I'm currently working on has issues. I have done everything I can see to emulate those other pages as well, but I may be missing something. The guy who wrote that jQuery is no longer with our company.</p> <p>I have already searched SO, and none of these results have worked for me:</p> <p><a href="https://stackoverflow.com/questions/3498766/jquery-click-not-functioning">jQuery .click() not functioning</a></p> <p><a href="https://stackoverflow.com/questions/4968181/jquery-click-problem">jQuery .click() problem</a></p> <p><a href="https://stackoverflow.com/questions/8142223/jquery-button-not-respond-to-click-method">jquery button not respond to click method</a></p> <p><a href="https://stackoverflow.com/questions/3179847/jquery-click-event-issues">jquery click event issues</a></p> <p>+others that are all along the same lines.</p> <p>Any insight would be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload