jQuery function in a external javascript file isnt working -
i have external javascript file function:
$(document).ready(function () { $("#save").on('click', function () { window.open('data:application/vnd.ms-excel,' + encodeuricomponent($('#exporttoexceldiv').html())); e.preventdefault(); }); });
and link looks like:
<a href="#" title="save"><img src="../../images/glyphicons_446_floppy_save.png" id="save" name="save"></a>
but function not working on link. nothing wrong linking between files (tried alert function works)
and functions works when type directly in html.
Comments
Post a Comment