I need to create a simple function in jQuery which will call within other few functions
$(document).ready(function() {
function reload_cart() {
alert('reload cart called');
}
});
$(document).ready(function() {
reload_cart(); //i need to call from here.
});
$(document).ready(function() {
$('a.add_to_cart').live('click', function (e) {
reload_cart(); //i need to call from here.
});
});
The error I get in firebug: reload_cart() is not defined.