Reply To: Filter box position

#7212
Ernest Marcinko
Ernest Marcinko
Keymaster

Hi!

I noticed you have 3 instances of the same search shortcode on that page each of these have a different settings box as well. Each of the search boxes is placed on a separate slide of the home page slider. However the settings boxes are in a hovering position, removed from the slider to the document body to maintain compatibility in case any container element is set to a relative position.

Whenever the slider switches a slide (once every ~10 seconds) the current search instance disappears and of course the script cannot find it so it resets to the default position (top left corner).

The only solution I can think of is to bind an event to the layer slider slide change to close the settings when the slide is changed, so I have added the following event callback on slider settings: https://i.imgur.com/bJ3PnX0.png

Optional: if you want to stop the slider animation if the settings is hovered, you can put this to your active themes footer.php file just before the closing body tag:


<script>
$('.searchsettings').mouseover(function(){
    lsjQuery("#layerslider_1_1").layerSlider('stop');
    lsjQuery("#layerslider_1_1").layerSlider('start');
});
<script>
Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)