Jquery On Button Click Alert Issue
JSFiddle demo: https://jsfiddle.net/cr33q8v7/ $('#findMyWeather').click(function() { alert('button clicked'); }); All I'm trying to verify is if the JQuery is working and I'm
Solution 1:
You need to include the jQuery library in JSFiddle. Click the gear that says Javascript and choose the version of jQuery that suits you.
Solution 2:
Your fiddle doesn't actually include jQuery via a script tag.
e.g. add: <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
to your HMTL
Solution 3:
you must add below line after last div between body
tag :
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4
/jquery.min.js"></script>
Here is Demo
Solution 4:
Add the cdn link for Jquery. Without jquery it will not work. You can add it to the before end of body tag.
Add:<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
Solution 5:
use jquery online by adding <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
.
<html><head></head><title></title><scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script><body><buttonid="check">Click on me to check if jquery is working ....!</button></body><scripttype="text/javascript">
$("#check").click(function(){
alert("yep, jquery is working");
});
</script></html>
Post a Comment for "Jquery On Button Click Alert Issue"