<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script>
function myfun()
{
alert("You have clicked on first div");
$(".def").click(function () {
alert("You have clicked on the second div");
});
}
Now I want is that when clicked on the paragraph it will alert as "paragraph". If clicked on the div it will alert as "div". Means I want the tagname in the alert box.
Well I understand the preventdefault meaning. Its work is to prevent the default action of the event. But I could not understand what stoppropagation does?
The documentation of stoppropagation uses the word bubble up. What does it mean?
I want to submit the form based on the return type of the ajax from the server. Suppose I want to submit the form if return data is "1" and don't want to submit the form if result is "0".
Problem is that in both the cases the form is being submitted.
Recently i was going through the ".load" method in jquery. Almost every thing i understood except one thing that how will i be able to send some data to server when requesting a particular page on the server. Suppose i want to send x=2 to the test.php on the server.