How can I fire a jquery event if the element in view gets pushed to a new line? I'd like to hide the nav items and also run some other javascript when this happens. Any suggestions on how to do this?
In a large view this is what my nav looks like:
This is what happens when I reduce my screen width. When this happens I want to fire events on those elements. How do I do this?
If the view get's pushed down, it's based on the width of the container.
Try using .resize() to keep track of the width & call the relevant functions when the width get's lower.
$(window).resize(function() {
// if the navigation DIV's width is smaller than xyz, do this ...
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.