daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ## styles.css [css]
  3. div.schools_by_state .content .entry div[id*="state-"]{
  4.     position: absolute;
  5.     left: -9999em;
  6. }
  7.  
  8. ## footer.php [javascript]
  9.  
  10.     $(document).ready(function() {
  11.         function offsetter(offset, els){
  12.             els.each(function(){
  13.                 var curOffset = $(this).position().top;
  14.                 $(this).css("margin-top", curOffset + offset.outerHeight() + "px");
  15.             });
  16.         }
  17.         offsetter($("#topschools"), $(".schools_by_state"));
  18.         $("#topschools").css("position", "absolute");        
  19.     });
  20.    
  21.     var oldState = 1;
  22.     $("#school_select").change(function(){
  23.         var fold = {"position"   : "absolute", "left" : "-9999em"};
  24.         var unFold = {"position" : "relative", "left" : "0"};
  25.         $("#state-"+oldState).css(fold);
  26.         oldState = $(this).val();
  27.         $("#state-"+oldState).css(unFold);
  28.     });
RAW Paste Data
Top