Click here to Skip to main content
15,064,806 members
Please Sign up or sign in to vote.
2.23/5 (3 votes)
See more:
Hi,

How can I call a javascript function from a jquery?

thanks
Posted
Updated 24-Jun-20 8:40am
v2
Comments
Dalek Dave 7-Dec-10 3:58am
   
Edited for Grammar.

jQuery is customized Javascript kind of!
Just call the method as you do in normal Javascript.
   
Comments
niravsahayata 7-Dec-10 2:51am
   
i want to call ScrollTop function insde $('#desti').click(),how can i do this??

<script type="text/javascript">
$().ready(function() {
$('#desti').click(function(){});
} ):
function ScrollTop()
{
document.getElementById('frameDiv').scrollTop = 0;

}
</script>
Dalek Dave 7-Dec-10 3:58am
   
Simple Answer! :)
Sandeep Mewara 7-Dec-10 4:29am
   
Try $('#desti').click(function(){ScrollTop();});
niravsahayata 7-Dec-10 4:41am
   
THANKS...its working.
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900