Shape 5

Wordpress Club Themes => Corporate Response - Club => : biru32 February 26, 2014, 10:52:48 AM



: Info Slider control amount of slide-over that displays
: biru32 February 26, 2014, 10:52:48 AM
Hi there, I looked in the s5_info_slide.js file for this, but I'm not exactly sure how this is controlled. I would like the info slide-over feature to appear or cover a percentage of the image behind it. For example: Instead of the black slide-over covering 100% of the image behind it, I would like for it to maybe cover 50% or 33%, etc. Make sense?

Thanks!

Jason


: Re: Info Slider control amount of slide-over that displays
: Tristan Rineer February 27, 2014, 02:29:36 PM
Unfortunately, I'm not a javascript specialist, and I have no idea where to look.  Even if I was, custom coding isn't covered by support; I suggest checking out the Hire-a-Coder (http://www.shape5.com/hire_a_coder/) area to see if anyone can help.


: Re: Info Slider control amount of slide-over that displays
: biru32 March 03, 2014, 03:59:44 PM
I wouldn't classify this as custom coding, just a matter of changing one item in the script. Anyway, just in case someone else asks this question, I wanted to post my solution:

Look for the following code:

jQuery(item).mouseenter(function (d) {var height=items.eq(index).children('img')[0].offsetHeight;                           jQuery('.'+options.items5_is_slide,jQuery(d.target).parents('.'+options.s5_is)).eq(0).animate({height:height+'px'},300);                        });

within that look for: {height:height+'px'} within that string of script.

Add this: ,'height':'43%' after the 'px'

Your final section of script should look like this: jQuery(item).mouseenter(function (d) {var height=items.eq(index).children('img')[0].offsetHeight;                           jQuery('.'+options.items5_is_slide,jQuery(d.target).parents('.'+options.s5_is)).eq(0).animate({height:height+'px','height':'43%'},300);                        });

I used 43%, but you can use anything you like.

Jason


: Re: Info Slider control amount of slide-over that displays
: Tristan Rineer March 04, 2014, 01:23:14 PM
"Custom Coding" means anything not related to bugfixes or outside the intended function of the release.

Thanks for the info though!  Hopefully anyone wanting to do the same thing in the future will find this thread and be able to use the information.