jaymc Posted July 5, 2009 Share Posted July 5, 2009 <script type="text/javascript" src="/lite/cp/js/jquery.js"></script> <script type="text/javascript">$(document).ready(function(){$('.bann').addClass('clicked');});</script> <script type="text/javascript" src="/lite/cp/js/plugins.js"></script> <script type="text/javascript">$(document).ready(function(){$("#page_content_title").show(500);});</script> For some reason when I call $(document).ready(function(){$("#page_content_title").show(500);}); as shown above it works intermittently in chrome upon page refresh. In firefox it never works and in IE it works perfect Im guessing its the order/speed in which the browser is processing, hence it may try and run that code when the #page_content_title div has not been fully registered Any ideas? Anything I can do to test / make it reliably work Quote Link to comment Share on other sites More sharing options...
haku Posted July 5, 2009 Share Posted July 5, 2009 <script type="text/javascript" src="/lite/cp/js/jquery.js"></script> <script type="text/javascript" src="/lite/cp/js/plugins.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.bann').addClass('clicked');}); $("#page_content_title").show(500); }); </script> Using two document ready calls will confuse some browsers. You need to combine them. Quote Link to comment Share on other sites More sharing options...
jaymc Posted July 5, 2009 Author Share Posted July 5, 2009 I have now used your example but its still doing the same? There are no other instances oF .ready Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.