I'd like to have some jquery in my html on my custom wordpress page. Now this does work (from an example):
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("p").click(function(){
alert("Action ABC")
});
});
</script>
Whereas this does not. There simply doesn't happen anything when the box is checked.
<p id="agre"> <input type="checkbox" name="agre">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(function(){
$('#agre').click(function(){
var agree_conf = confirm("Action A");
if (agree_conf == true) {
window.location = "http://www.google.com"
}
})
</script>
This has maybe to do with the proper jquery/wordpress call. But I can't figure it out.