View Full Version : help!

09-28-2009, 08:06 PM
The following code is driving me MAD...

I just want the h5 to be clickable, and when you click it it will show the company details, when you click it again it hides them! I'm seriously going crazy because the function works in firebug but not when I upload it to the site!!!!! ARRGH!!! Why would it do this???

jQuery(document).ready(function (){


<div style="display:none;">
<div class="specialistContainer">
<h5>Company name</h5>
<div class="twistyContent">
123 street
Lotherton Way
LS25 4GB
0113 287 2222
<a href="mailto:companyemail" style="color: #000;font-weight: bold;">info@companyemail.com</a>
<a href="http://www.companyurl.com" target="_blank" alt="Paul Turner Signwriters" title="Paul Turner Signwriters" style="color: #000;">www.companyurl.com</a>

What am I doing wrong!??! :confused:

09-28-2009, 08:07 PM
See #2:


09-29-2009, 04:22 PM
Ok to anyone seeking the answer:

My problem was different. I found out from a little more investigation the page is dynamically copying the HTML from a hidden portion of the page, & inserting it as new HTML of a newly created element. That is why the event handler's were not being attached to the proper element and thus not registering clicks.

the code above needs some minor tweaks but it works if youre using those names