Created
October 18, 2017 18:08
-
-
Save tjkelly/36833de90a95d7992d6c431f75eb00f8 to your computer and use it in GitHub Desktop.
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
(function($){ | |
"use strict"; | |
function tjk_fixed_width(){ | |
var widget_area = $('div.widget-area'), | |
widget_text = widget_area.find('aside.widget.widget_text'); | |
if(window.scrollTop > widget_area.height()){ | |
widget_text.addClass('f-wid'); | |
} else { | |
widget_text.removeClass('f-wid'); | |
} | |
} | |
$('window').on('scroll', function(){ | |
tjk_fixed_width(); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment