Hi I’m pretty new to javascript looking for some help on creating an argument and adding it to a click event in jquery
Heres a demo: http://jsfiddle.net/zidski/8VwAy/1/
Can someone help example what I have to do?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First: Do not use
argumentsas a variable name, since every function already defines theargumentsobject.Your code does not work, because you have injected the JavaScript through the
onloadsetting in JSFiddle. This runs code after the document has loaded.In the body section, you’re calling a function which is not defined yet.
What happens?
Definition:
Calling order:
Change
onloadtonowrap (head)to get your code to work: http://jsfiddle.net/8VwAy/7/