- This topic is empty.
-
AuthorPosts
-
January 1, 2012 at 10:33 pm #35923guswahMember
I’ve used — with glee — the anythingSlider, but now I’ve reached a few small glitches.
1. I’ve obscured an email address with a javascript scrambler in one of the divs, but this stops anythingSlider dead in its tracks.
2. In another div I’ve included a small contact script. Eager to test it, I realize that I have no input focus anywhere on the slider.Help is graciously appreciated.
January 2, 2012 at 1:08 am #93840MottieMemberHi Guswah!
Don’t include any scripts inside of the slider, unless it is inline scripting. i.e., don’t use <script> tags inside the panels especially if it has a “document.write”. But something like this is okay:
email me
To focus on the input inside of the slider, use the “onComplete” callback function. Check the slide number and if it matches, add focus to the input.
If you need examples, I’ll make some for you in the morning.
January 2, 2012 at 8:34 am #93847guswahMemberYes, I’d be delighted to have a simple example, and thank you!
January 2, 2012 at 9:22 am #93850MottieMemberOk here you go… look in the second panel:
January 2, 2012 at 6:47 pm #93867guswahMemberThanks a million for this. To make it work, I created a small JS and referenced it from my slider page. My preference, though, would be to incorporate it with my initialization code. Is that possible, and where would I insert it?
January 2, 2012 at 10:41 pm #93880guswahMemberI take it back. The javascript doesn’t work in an external file either. I’m not sure why it worked momentarily, but I’ve tried a dozen times in the past few hours, and the focus is no longer there.
January 3, 2012 at 9:35 am #93910MottieMemberHi Guswah!
The jsFiddle doesn’t show it but all of that code is wrapped in a
$(document).ready(function(){
/* code goes here */
});January 4, 2012 at 7:40 am #93977guswahMemberYou’re a gem, Mottie, and thanks again.
January 6, 2012 at 9:58 pm #94199guswahMemberJust when I thought I was wrapping this up, I discovered that my page that includes anythingSlider will not acknowledge clicks on links to other pages. Those anchors, by the way, are not inside the slider but rather well before and after in the code.
I should mention that the JS that Mottie kindly provided for gaining focus in a form within the slider is not the problem. I had to relocate the form elsewhere because there were other problems with it that made it too unwieldy. I was also careful to remove the javascript.
I’ve tested the page by removing the reference to anythingSlider’s JS, and that solves the problem. Have I missed something in setting up anythingSlider that would logically be the reason for my non-functioning links?
January 7, 2012 at 12:18 am #94203MottieMemberI’d have to see the javascript on your page in order to help this time. It’s difficult to guess at what might be interfering.
January 7, 2012 at 8:05 am #94209guswahMemberThe page with anythingSlider is here:
The inaccessible links are in the top left corner.
January 8, 2012 at 12:44 am #94255guswahMemberEureka!
Well, not totally, but it’s encouraging. I found that when I remove the javascript snippet for external navigation … presto! — my non-slider links work just fine. The downside, of course, is that visitors are no longer able to surf through the slide panels using the horizontal extNav menu at the bottom.
Is there possibly a modification to the JS that would allow functionality for both kinds of links?
January 8, 2012 at 9:02 am #94275MottieMemberHi Guswah!
Hmm, All you should need to do is rename this extNav group to something else like “extNavTop”, because it isn’t tied into the AnythingSlider at all.
The javascript snippet is meant to target the other “extNav” links with hash marks.
January 8, 2012 at 12:17 pm #94282guswahMemberWell, duh. Rename the class? I just removed it!
Of course any darned fool should have known that. I stared for so long at that page that I completely overlooked it. Thanks a million.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.