issue calling jquery function from javascript -
this question has answer here:
having issue calling jquery function javascript function. sure have done before... cant understand issue having. provide.
$(document).ready(function(){ function funb() { alert("b working"); }; }); funa(); function funa() { alert("a working"); funb(); };
you either need put them within same enclosure:
$(document).ready(function(){ function funb() { alert("b working"); }; function funa() { alert("a working"); funb(); }; funa(); });
or alternatively, put funb
on window it's accessible funa
:
$(document).ready(function(){ window.funb = function() { alert("b working"); }; }); funa(); function funa() { alert("a working"); funb(); };
Comments
Post a Comment