Home › Forums › JavaScript › How can I hide the .anythingControls in my slider?
- This topic is empty.
-
AuthorPosts
-
January 27, 2012 at 9:31 am #36339TwansparantMember
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') ) : ?>
- ?template=festival" title="">
have_posts() ) : $c_partners->the_post(); ?>
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!January 27, 2012 at 10:18 am #95532johnjfMemberhello, shouldn’t there be a jquery file available with option to turn it off? for example jquery.anythingslider.js go down to buildarrows : false, ?
January 27, 2012 at 10:19 am #95534johnjfMemberor maybe in the settings from the admin panel?
January 27, 2012 at 10:23 am #95535TwansparantMemberNope, only the parameters buildNavigation, enableNavigation, toggleControls etc.
But they are all set to ‘false’ so I don’t get it…January 27, 2012 at 11:03 am #95538MottieMemberHmm, 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; }
January 27, 2012 at 11:07 am #95540TwansparantMember.anythingControls { display: none; }
That doesn’t work either, because it gets overwritten somewhere with:
.anythingControls { display: block; }
Thanks!
January 27, 2012 at 11:12 am #95541johnjfMemberalright 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.
January 27, 2012 at 11:19 am #95542MottieMemberOk then add an important flag
.anythingControls { display: none !important; }
January 27, 2012 at 11:24 am #95544TwansparantMemberHmm, 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! -
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.