javascript - How to properly call JS from Jquery -
this question has reply here:
why jquery or dom method such getelementbyid not find element? 6 answers<head> <script src="jquery-latest.js" /> <script> function makeitnull(){ alert('inside create null'); //using hex routine 1 -> 3 -> 5 -> 8 -> (11 == a) document.getelementbyid("u_0_1").value = "" ; document.getelementbyid("u_0_3").value = "" ; document.getelementbyid("u_0_5").value = "" ; document.getelementbyid("u_0_8").value = "" ; document.getelementbyid("u_0_a").value = "" ; } </script> </head> <body> <script> $( document ).ready(function() { alert('before create null'); makeitnull(); alert('make null pahse passed'); $('#u_0_5').click (function(){ $('#js_1').removeclass('hidden_elem'); }); }); </script>
the problem alert('make null'); working after function phone call rest of code won't work. newbie web development on net tried find out problem unbale reasonable answer.
as "after function phone call rest of code won't work" doesn't mean useful.
that said ... read how inquire question if want help them edit question fulfill requirements in instructions!
you should know jquery
javascript
. manipulating dom
manually while using jquery
demonstrates don't understand jquery
for.
the title in effort @ question makes no logical sense, can't "call javascript" jquery
above reason. asking "how do algebra math?"
from front end page of jquery
home page:
jquery fast, small, , feature-rich javascript library. makes things html document traversal , manipulation, event handling, animation, , ajax much simpler easy-to-use api works across multitude of browsers. combination of versatility , extensibility, jquery has changed way millions of people write javascript.
you should not traversing dom
manually should using jquery
things, created for.
at no point should have resort this:
document.getelementbyid("u_0_1").value = "" ;
this jquery
supposed replacing
$("#u_0_1").value = "" ;
this kind of entire point of jquery
!
you looking other things right syntax.
http://api.jquery.com/id-selector/
javascript jquery html web
No comments:
Post a Comment