Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript jQuery
Hi,
 
How can I call a javascript function from a jquery?
 
thanks
Posted 6-Dec-10 20:53pm
Edited 6-Dec-10 22:58pm
Dalek Dave432.9K
v2
Comments
Dalek Dave at 7-Dec-10 3:58am
   
Edited for Grammar.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

jQuery is customized Javascript kind of!
Just call the method as you do in normal Javascript.
  Permalink  
Comments
niravsahayata at 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 at 7-Dec-10 3:58am
   
Simple Answer! :)
Sandeep Mewara at 7-Dec-10 4:29am
   
Try $('#desti').click(function(){ScrollTop();});
niravsahayata at 7-Dec-10 4:41am
   
THANKS...its working.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
v2

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 20 Oct 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100