Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery - Cant Select HIdden Elements
    text
    copied!<p>This one is driving me nuts.</p> <p>Iv written a page, using jQuery, its big to paste here, but ill post a cut down example.</p> <p>There is a content pane that loads empty.</p> <p>Then there is three hidden divs, with content for contact details, site details etc.</p> <p>The idea is when you click a button, I simply swap the contents of the divs into the blank content pane (div) and cleanly slide it in and out. </p> <p>This all works fine, although here's my problem.</p> <p>I have a send button on the contact form, but no matter what I try, I cant select it with jQuery.</p> <p>Iv stripped out all the contact code behind it, and now all im trying to do is pop up an alert box, and I cant even do that.</p> <p>ie <code>$('.send').click(function() {alert('Something');});</code></p> <p>The only conclusion I can come up with is that because the contact panel is hidden when the page loads, its failing to select it.</p> <p>I add the same "Send" button onto the two other divs, and only the divs' hidden when the page loads fail, the div thats displayed when the page loads first works fine.</p> <p>Its maybe hard to describe, but take a look at the code at this page: <a href="http://cheynewallace.com/custom/about/" rel="nofollow">http://cheynewallace.com/custom/about/</a></p> <p>Under the experience tab, "this site" tab and the "contact" tab, you can see the first word is a bolded "Send" , this is what im trying to use. You can see all three "Send" buttons are exactly the same.</p> <p>So why does it only work on the 1 ? The selector im using will select all classes of .send.</p> <p>Cheers</p>
 

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