javascript - IE wont fire my jquery's .click function. what could i do? -


okay have following code below:

script:

 <script>  $(document).ready(function() {       $(".header").click(function () {    $(this).effect("bounce", { times:2 }, 200);      $(".links").show("slow");    });  });  </script> 

html:

 <body>    <div class="header">      <p><img src="images/logo.png" width="438" height="131" alt="larz conwell" /></p>      <p><span class="dash">//</span> freelance web designer &amp; graphic artist</p>    </div>     <div class="links">    </div>  </body> 

and in ie wont work @ all, works on other browsers. problem?

also tried site have jquery on , works perfectly.

i think javascript getting executed before dom ready. try using $.live();

$('.header').live('click', function(){}); 

this execute event if class created later in dom.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -