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 Link to comment https://forums.phpfreaks.com/topic/164834-jquery-show/ 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. Link to comment https://forums.phpfreaks.com/topic/164834-jquery-show/#findComment-869265 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 Link to comment https://forums.phpfreaks.com/topic/164834-jquery-show/#findComment-869276 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.