Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS focus in anythingSlider

  • This topic is empty.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #35923
    guswah
    Member

    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.

    #93840
    Mottie
    Member

    Hi 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.

    #93847
    guswah
    Member

    Yes, I’d be delighted to have a simple example, and thank you!

    #93850
    Mottie
    Member

    Ok here you go… look in the second panel:

    http://jsfiddle.net/Mottie/VM8XG/4264/

    #93867
    guswah
    Member

    Thanks 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?

    #93880
    guswah
    Member

    I 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.

    #93910
    Mottie
    Member

    Hi Guswah!

    The jsFiddle doesn’t show it but all of that code is wrapped in a

    $(document).ready(function(){
    /* code goes here */
    });
    #93977
    guswah
    Member

    You’re a gem, Mottie, and thanks again.

    #94199
    guswah
    Member

    Just 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?

    #94203
    Mottie
    Member

    I’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.

    #94209
    guswah
    Member

    The page with anythingSlider is here:

    http://foxmeadows.ca/new

    The inaccessible links are in the top left corner.

    #94255
    guswah
    Member

    Eureka!

    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?

    #94275
    Mottie
    Member

    Hi 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.

    #94282
    guswah
    Member

    Well, 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.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘CSS’ is closed to new topics and replies.