[Solved] is preventDefault() a jQuery function or a javascript function?


event.preventDefault() is built into modern browsers (IE9 and greater). You do not need jQuery to use it so yes, you can just call it directly on your event object assuming you have a standard event object.

The jQuery version of that function was originally created to allow a single programming model while still supporting older versions of IE that did not support it. If you don’t need to support older than IE9, then you can just use the plain JS version on a stock event object.

1

solved is preventDefault() a jQuery function or a javascript function?