Forums

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

Home Forums JavaScript How can I hide the .anythingControls in my slider?

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

    Hi there,

    I just started playing with this great anythingSlider WordPress plugin, but I can’t seem to figure out how I can totally hide the anythingControls div on a certain slider.

    This is the script I’m currently using to get posts from a certain custom post type and put them in the slide:

    
    'connected_type' => 'event-partner',
    'connected_items' => $fibereventid,
    'posts_per_page' => -1,
    'partner-type' => 'premium',
    'orderby' => 'rand'
    ) );
    if ($c_partners->have_posts() && !is_page('4658') ) : ?>


    But no matter what I try, the anythingControls div still shows up!
    The

    .find(".anythingControls").hide();

    line disables the slide completely, so that’s not working.

    Does anyone have an idea?
    Thanks!

    #95532
    johnjf
    Member

    hello, shouldn’t there be a jquery file available with option to turn it off? for example jquery.anythingslider.js go down to buildarrows : false, ?

    #95534
    johnjf
    Member

    or maybe in the settings from the admin panel?

    #95535
    Twansparant
    Member

    Nope, only the parameters buildNavigation, enableNavigation, toggleControls etc.
    But they are all set to ‘false’ so I don’t get it…

    #95538
    Mottie
    Member

    Hmm, that setup really should be hiding the controls. You should remove the second function because it shouldn’t be necessary and anyway it is being completely ignored

    jQuery('#partner-slider').anythingSlider({
    onInitialized: function(e, slider) {
    .find(".anythingControls").hide(); // include options here
    }
    });

    because of the way the plugin is written. Also there is an error in the code because “.find()” needs a selector in front.

    Worse case senario, you can just add this css:

    .anythingControls { display: none; }
    #95540
    Twansparant
    Member
    .anythingControls { display: none; }

    That doesn’t work either, because it gets overwritten somewhere with:

    .anythingControls { display: block; }

    Thanks!

    #95541
    johnjf
    Member

    alright think I found it. Go to plugin, underthe sliderplugin click on edit plugin. To the right find the jquery.anythingslider.js file and click on it to edit. Go down to buildarrows : and change it from true to false.

    Hope that works, let me know.

    #95542
    Mottie
    Member

    Ok then add an important flag

    .anythingControls { display: none !important; }
    #95544
    Twansparant
    Member

    Hmm, I think I got it…
    The div.anythingSlider has a default padding at the bottom, if you don’t remove this, there will be a gap underneath the div!
    Thanks for your help!

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