});
can someone tell me how does loop work in jQuery am using each and selecting all li tag, now in the function parameter I pass index which I believe it a built in jQuery keywordZ. am not sure but it the below python code the same to the looping system in jQuery because in python index is implicit given 0 so this will loop from 0 to 9 though in jQuery is the list tag representing the index parameter and also the event parameter

can someone give me the equivalent? to python format of
Not exactly sure what you are asking here.
Firstly, the second argument of the jquery selector each is a reference to the element, not an event.
The index is correct, you should loop over each element and index = n-1 where n is the length of elements.
My question is how does jQuery know to use the index keyword in the function parameter as it start count and end count when looping the li tag what am suggesting to understand is below
is equivalent to

var index = $(“li”)
here variable index will given a range of 0-5 suppose I have 5 li in my document
now when I write the function not to be anonymous and since am my variable index get the range in number the index is used for my run function

although I place console.log(event); In the run function can someone tell me if the event var get it value from the li tag object also is the the default behaviour, here another example I see

is cancel_relolad using the value from “ul” as it parameter value for the function when called with preventDefault(); also is the the standard of passing value to a function In jquery in which case, either using a selector a class or a id?

You might have better luck getting the python equivalent in a python subreddit. Personally I haven’t played with python yet.
Members
Online

source