Forums

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

Home Forums JavaScript Anythingslider not working with wordpress

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #29166
    brubrant
    Member

    Hi folks,

    I’m trying to implement anythingslider in my wordpress site at: http://nauweb.com/dev/new/?page_id=70 but I can’t make it work.

    I’m sure I have all the scripts properly loaded at my Head.

    Can someone take a look and tell where is my mistake?
    I know the CSS are all messed up, but, I’ll deal with it later.

    Thanks in advance!

    Bruno.

    #76529
    brubrant
    Member

    Problem solved!

    Looks like there is a conflict between hybrid’s Dropdown.js and Anything slider.

    So, if anyone using hybrid (http://themehybrid.com) wants to use anythingslider, you should disable de Dropdown Javascript.

    #83763
    defsamm
    Member

    Hi Bruno

    I’m having trouble including AnythingSlider in WordPress. I keep getting $(‘class’).anthingSlider is not a function. I see you got it working on your site with no errors! How did you include the plugin? I’m baffled why it’s doing this because it’s in no conflict mode.

    Cheers

    Sam

    #83779
    Mottie
    Member

    Hi @defsamm!

    Are you using the latest AnythingSlider plugin for WordPress? If not, try it out.

    Also, I don’t know if it’s just misspelled in the last post, but “anythingSlider” has a “y” in it :)

    #85857
    defsamm
    Member

    Hi Mottie,

    Thanks for the response and the link and the AnythingSlider support! I misspelled ‘anythingSlider’ in the post only. The wordpress plugin is great, but I need to use the FX plugin with it too and you can’t do that with the WP plugin. Just tried putting the normal jQuery plugin into my WP theme again, and I’m getting the same error. It’s strange – I have jQuery running in no conflict mode, and the only other jQuery plugins I have running are easing and validate.

    I’m looking at maybe putting the slider and the fx options into a plugin/widget, and passing the code onto Jacob.

    Thanks again

    Sam

    #85858
    Mottie
    Member

    Hey Sam!

    When you use no conflict mode, instead of using the “$”, use “jQuery” instead, because the “$” gets reverted to it’s previous state. So do this:

    jQuery('class').anythingSlider();

    Jacob has been working on integrating the FX extension with the WP plugin so we’ll just have to be patient a bit longer ;)

    In the mean time, have you checked out the FX builder bookmarklet I made? It’s still in beta and I’m sure there are still some bugs in it but it should make adding FX a lot easier.

    #85905
    defsamm
    Member

    Cheers Mottie,

    Gave that a try but still no joy :(

    The way I’m calling jQuery in no conflict mode is like this:

    jQuery(document).ready(function($) {

    function formatText(index, panel){return “”};

    $(‘ul.hp_slider’).anythingSlider({

    width: 940,
    height: 350,
    buildArrows: false,
    buildNavigation: true,
    delay: 7000,
    animationTime: 900,
    easing: “easeInOutExpo”,
    hashTags: false,
    navigationFormatter: formatText

    })

    .anythingSliderFx({
    ‘.sldr_txt_cont’ : [ ‘caption-Right’, ‘640px’ ]
    });

    });

    I gave it a try without any $ signs but still got the same error telling me that it isn’t a function. I’ll keep hacking about and trying different things :)

    Your FX builder bookmarklet looks really cool. I’ll be having a play with that!

    Thanks again

    Sam

    #85911
    Mottie
    Member

    Another problem I’ve run into is that jQuery gets loaded twice on the page. Once above the script tag that loads the plugin and once again below it. What happens is that the plugin code attaches itself to the first copy, but by the time the document ready event fires, the second copy of jQuery has taken over. The second copy doesn’t have the slider plugin attached to it so it throws an error.

    So essentially, double check to make sure that there aren’t two copies of jQuery being loaded on the page.

    #85912
    defsamm
    Member

    Cheers Mottie

    Found what the problem was about a minute ago! It was to do with the way I was calling the script. After going through my code with a fine tooth comb, I’d omitted a / in the file path… This explains the error message.

    Feel like a prize fool now. Thank you so much for all the help and really sorry that it was such a silly little thing. If I manage to get the FX plugin into a widget, I’ll send it over to see if it helps Jacob.

    Thanks again

    Sam

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