How to Fix Null Error on Document Ready in Jquery
I'm working on a script that uses jquery and it's working normally on a simple page that I made. However when I create a master page...

$("#controlId") is null error
My javascript structure inside the page: <script language="javascript" type="text/javascript"> $(document).ready( function() { alert($("#controlId")); //this will return null } ); </script> //solution, get the no conflict version <script language="javascript" type="text/javascript"> var $j = jQuery.noConflict(); $j(document).ready( function() { alert($j("#controlId")); //object is properly initialized } ); </script>
Post a Comment