Using Jquery functions on a ClientLibrary
I am having some trouble on using a Jquery function my js file inside my clientLib folder. Inside my js file the code that I used was:
$(document).ready(function(){ alert("test") $('.storeLocatorFormSubmit').click(function(){ alert("Hello world"); }); });and then stumbled on a question on Stackoverflow where it suggest that instead of using the "$" I replaced it the word "jQuery" so after changing the code into this:
jQuery(document).ready(function(){ alert("test") jQuery('.storeLocatorFormSubmit').click(function(){ alert("Hello world"); }); });The alert with value of "test" is now being displayed on the page but the alert box does not show every time I click the button of "storeLocatorFormSubmit".