Click here to Skip to main content
12,956,197 members (102,369 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hi,

How can I call a javascript function from a jquery?

thanks
Posted 6-Dec-10 19:53pm
Updated 6-Dec-10 21:58pm
Dalek Dave433.3K
v2
Comments
Dalek Dave 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 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.
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)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,849
CHill60 3,550
Maciej Los 3,223
ppolymorphe 2,060
Jochen Arndt 1,975


Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 20 Oct 2011
Copyright © CodeProject, 1999-2017
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