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

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -