$(document).ready(function(){ $('#something ul a').click(function(e) { ... ... e.preventDefault(); }) });
what is e for and e.preventDefault, so I can understand what is going on here.
The argument eis an eventobject .It contains information about the click event.
e
event
See the documentation for more information .
preventDefault()The method prevents the default action for the default server for borwser.In this case, the browser will not be able to go to the link.
preventDefault()
This prevents the default action for the event, for example. transition to the URL-address or scroll the page up #locationinto href.
#location
href
jQuery .
e , .
E - preventDefaults . , , preventDefaults, .
E
preventDefaults
preventDefault() borwser. . shareedit
Source: https://habr.com/ru/post/1764516/More articles:Сохранение Wi-Fi/3g для заблокированного iphone - iphoneChange the URL in the browser using C # codebehind (NOT seo routing or URL rewriting) - c #What happens if HttpClient.execute () is interrupted? - javaWi-Fi connection not alive when sleeping, with iOS4 - iphoneEmacs Starter Kit on Mac - emacscode optimization haskell - optimizationKeep WiFi connected even iPad goes to sleep / locked in iOS 5 - objective-cHow to parse an xml fragment in nodes and add them to a node with the specified default namespace so that they are part of this namespace? - c #Jar files are deleted on restart - javaC # reads binary data from a socket - c #All Articles