Call a Javascript Function with Jquery
Posted
by danit
on Stack Overflow
See other posts from Stack Overflow
or by danit
Published on 2010-06-07T14:20:16Z
Indexed on
2010/06/07
14:22 UTC
Read the original article
Hit count: 128
JavaScript
|jQuery
I have two functions in Javascript:
function getWindowWidth(){
var x = 0;
if (self.innerHeight){
x = self.innerWidth;
}else if (document.documentElement && document.documentElement.clientHeight){
x = document.documentElement.clientWidth;
}else if (document.body){
x = document.body.clientWidth;
}return x;
}function getWindowHeight(){
var y = 0;
if (self.innerHeight){
y = self.innerHeight;
}else if (document.documentElement && document.documentElement.clientHeight){
y = document.documentElement.clientHeight;
}else if (document.body){
y = document.body.clientHeight;
}
These appear to set the height and width of the document window, based on the size of the window? I could be wrong here....
What I have done is embeded a toolbar above this document, this toolbar can be hidden or shown at various points.
I need the above function to be called when I use the following jQuery,
$("#Main").animate({top: "89px"}, 200);
Any assistance greatly appreciated!
© Stack Overflow or respective owner