top button
Flag Notify
Site Registration

What is event.PreventDefault?

+2 votes
103 views
What is event.PreventDefault?
posted Jul 14, 2015 by Shivaranjini

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The event.preventDefault() method stops the default action of an element from happening.

For example: Prevent a submit button from submitting a form. Prevent a link from following the URL.

answer Jul 14, 2015 by Manikandan J
Similar Questions
0 votes

Please help any one with some basic examples.Am new to j query.

0 votes

I'm trying to call the hover event of the buttons placed on a tile when I hover over the tile, using jQuery. However, it is not working. This is the code I'm using

<script >
$( "#tile1" ).hover(function() {
    $('.btn-danger').hover();

 });

</script>

I've linked with jQuery separately in the head:

<script src="http://code.jquery.com/jquery-1.10.2.js"></script>

Can anyone point out what the problem might be?

...