i want to make function with parameter. i working with below code but it is not working. can anyone tell me what am i doing wrong.
<head>
<script type=\"text/javascript\" src=\"jquery-1.7.2.js\"></script>
<script type=\"text/javascript\">
$(function hide(fn){
$(fn).click(function(){
$(\'div\').hide()
})
})
</script>
<style>
div { width:500px; height:500px; background:#FF0000; }
</style>
</head>
<body>
<button onclick=\"hide(this)\">click for hide</button>
<a href=\"#\">click</a>
<button>click</button>
<div></div>
</body>





Rating:
The post parameter function in jquery appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/parameter-function-in-jquery.html
No comments:
Post a Comment