Created
November 5, 2012 20:08
-
-
Save Fabszn/4020049 to your computer and use it in GitHub Desktop.
Sample of use of Jquery.position()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css"> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script> | |
<style> | |
#myDiv{ | |
width: 100px; | |
height: 100px; | |
border:1px solid #00782D; | |
} | |
#atDiv{ | |
width: 300px; | |
height: 300px; | |
border:1px solid #953b39; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="atDiv" > | |
AT Div | |
<div id="myDiv" class="customTabs" > | |
My Div | |
</div> | |
</div> | |
<!--javascript init--> | |
<script> | |
$(function(){ | |
$("#myDiv" ).position({ | |
my: "left top ", | |
at: "right bottom", | |
of: "#atDiv" | |
}); | |
console.info("loaded"); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment