Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## styles.css [css]
- div.schools_by_state .content .entry div[id*="state-"]{
- position: absolute;
- left: -9999em;
- }
- ## footer.php [javascript]
- $(document).ready(function() {
- function offsetter(offset, els){
- els.each(function(){
- var curOffset = $(this).position().top;
- $(this).css("margin-top", curOffset + offset.outerHeight() + "px");
- });
- }
- offsetter($("#topschools"), $(".schools_by_state"));
- $("#topschools").css("position", "absolute");
- });
- var oldState = 1;
- $("#school_select").change(function(){
- var fold = {"position" : "absolute", "left" : "-9999em"};
- var unFold = {"position" : "relative", "left" : "0"};
- $("#state-"+oldState).css(fold);
- oldState = $(this).val();
- $("#state-"+oldState).css(unFold);
- });
Add Comment
Please, Sign In to add comment