ekallevig / jShowOff

A jQuery-based Features Rotator
http://ekallevig.com/jshowoff
85 stars 25 forks source link

Modify so clicking on labels takes you to a link? #63

Open ChrisRahe opened 12 years ago

ChrisRahe commented 12 years ago

We are using jShowOff on our church site using custom labels at the bottom for each slide. A lot of people are confused and don't realize that when they click on the text labels it just loads the slide. They don't realize they then have to click on the image in order to go to the specified page. Is there a way to modify it so that clicking on the text label actually takes you to the same link as if you clicked on the corresponding image?

I'm pretty good with HTML and CSS but I'm very much an amateur when it comes to PHP and JavaScript - I can muddle through simple changes, but I can't always figure this stuff out by myself.

john-benedict commented 11 years ago

I have a client request for this feature too.

Anyone have a solution?

john-benedict commented 11 years ago

If you're using the production (non-minimized) version -- look for line 232:

$(''+linktext+'').bind('click', {index:i}, function(e){ goToAndPause(e.data.index); return false; }).appendTo('.'+uniqueClass+'-slidelinks');

Replace with:

$(''+linktext+'').bind('mouseenter', {index:i}, function(e){ goToAndPause(e.data.index); return false; }).appendTo('.'+uniqueClass+'-slidelinks');

Basically -- just replace click with mouseenter after bind.

ChrisRahe commented 11 years ago

Thanks for responding. I’m guessing I have the minimized version because I’m not finding that bit of code anywhere in the js file.


Chris Rahe, web services director, Mennonite Church USA

From: John Benedict [mailto:notifications@github.com] Sent: Monday, October 15, 2012 6:35 PM To: ekallevig/jShowOff Cc: Chris Rahe Subject: Re: [jShowOff] Modify so clicking on labels takes you to a link? (#63)

If you're using the production (non-minimized) version -- look for line 233:

$(''+linktext+'').bind('click', {index:i}, function(e){ goToAndPause(e.data.index); return false; }).appendTo('.'+uniqueClass+'-slidelinks');

Replace with:

$(''+linktext+'').bind('mouseenter', {index:i}, function(e){ goToAndPause(e.data.index); return false; }).appendTo('.'+uniqueClass+'-slidelinks');

Basically -- just replace click with mouseenter after bind.

— Reply to this email directly or view it on GitHubhttps://github.com/ekallevig/jShowOff/issues/63#issuecomment-9464510.

john-benedict commented 11 years ago

Yeah -- you have to get the working version.

You can grab it here:

https://github.com/ekallevig/jShowOff