JQUERY not working as expected
It has an onclick event that changes window location, as well as a .click bind in JQUERY
For the .click bind Im trying to do a .post call and if any data is returned cancel
the original onclick event.
I thought this following code would do it but its not working as expected:
$("#button").click(function (event) {
$.post('URL', function(data) {
alert(data);
if (data!=""){$('#button').unbind('click');}
$('body').append(data);
});
});
Generate thousands of leads in any niche in under 60 seconds!
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."
Generate thousands of leads in any niche in under 60 seconds!
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."
Generate thousands of leads in any niche in under 60 seconds!