Search Form and Social Buttons

HotThemes Logo and Top Menu

To request a forum account, please login here and open support ticket. Only customers with active order(s) can open forum account!

× Discussion about Hot Image Slider free Joomla module.

Topic-icon Is it possible to pause slider onmouseover?

More
6 years 1 month ago #6039 by pedigopa
pedigopa created the topic: Is it possible to pause slider onmouseover?
Is it possible to pause the image slider when mousing over the button and/or respective image?

Please Log in to join the conversation.

More
6 years 1 month ago #6044 by ivan.milic
ivan.milic replied the topic: Re: Is it possible to pause slider onmouseover?
Well it can be done but you would need to change script. That file is:
/modules/mod_hot_image_slider/js/scripts.js

Here is a hint.You can add some global variable at begging of that file like :

var MOUSE_IN = false;

then add handler functions when mouse enters and leaves slider:

jQuery('#slide-holder').mouseenter(function(){MOUSE_IN = true;});
jQuery('#slide-holder').mouseleave(function(){MOUSE_IN = false;});

Finally find this script and add some condition like this (marked red):

....
auto: function () {
if (!slider.ar) return false;
if (MOUSE_IN) return false;
var next = slider.cur + 1;
if (next >= slider.num) next = 0;
slider.slide(next);
},...

Note that this scripts I gave you may not work and may contain syntax mistakes because its only hint.
The following user(s) said Thank You: oneworld95, joomir

Please Log in to join the conversation.

More
6 years 1 month ago #6050 by pedigopa
pedigopa replied the topic: Re: Is it possible to pause slider onmouseover?
Thanks for the response.

Okay, so what I need to do is create a variable called Mouse_In and set it to false.

Then I tell JQuery that when a user mouses over/out of the slide-holder div to toggle the new variables value.

Finally, I tell JQuery that if the variable is true to toggle it back to false.

Shouldn't the final IF statement also contain some control for stopping the animation? I'm sorry if this question seems stupid, I'm still learning Javascript and JQuery and I'm just not sure how the above example pauses the animation. I'll keep Googling.

Please Log in to join the conversation.

More
6 years 1 month ago #6061 by ivan.milic
ivan.milic replied the topic: Re: Is it possible to pause slider onmouseover?
The final line <if (MOUSE_IN) return false;> skips animation of next image if mouse is over the slider. return false; = abort further function execution in this case.

Please Log in to join the conversation.

More
4 years 11 months ago #18496 by Keith McBirnie
Keith McBirnie replied the topic: Re: Is it possible to pause slider onmouseover?
Hi, is it possible to post the code we would need to insert to pause the slider with a mouseover? Complete CSS coding ignorant here, apologies.

Thanks

Please Log in to join the conversation.

More
4 years 11 months ago #18508 by ivan.milic
ivan.milic replied the topic: Re: Is it possible to pause slider onmouseover?
It is described in post #6044, any further assistance would require you to pay for custom job.

Please Log in to join the conversation.

Time to create page: 0.123 seconds

Links, Partners and Social Media