Home › Forums › JavaScript › Anything Slider Again
- This topic is empty.
-
AuthorPosts
-
April 7, 2011 at 9:34 am #32266XaviJrParticipant
jamy_za advised me about this slider:
https://css-tricks.com/forums/discussion/11454/solved-video-gallery-with-slider/#Item_4Well, i was able to make the slider work but now i have a problem.
I have a 2 column website and i want the slider inside the left one. What is appearing is simply a centered slider, over all the content.
Is this customizable or it only makes centered sliders?
April 11, 2011 at 9:13 am #51678jonibeMemberHow about wrapping the whole slider into another div?
And position this wrapper as you please.
Or i persume that you’re issue is the auto margin applied: in anythingslider.css/******* SET DEFAULT DIMENSIONS HERE ********/
div.anythingSlider {
width: 700px;
height: 390px;
margin: 0 auto;
overflow: hidden; /* needed for Opera and Safari */
}You could change margin into:
margin: 0;
But this is all just guessing …
April 13, 2011 at 9:31 am #51522XaviJrParticipantYes, i’ve reached that conclusion from a similar post, thanks anyway.
Now i have another problem: when i call
$('#slider1').data('AnythingSlider').goForward();
or
$('#slider1').data('AnythingSlider').goBack();
the page is scrolled to the top. Any ideia why this is happening?
April 13, 2011 at 9:46 am #51523jamygoldenMemberIt sounds like it isn’t returning false. Try this (I have no idea if this will work or not but it’s worth a shot)
$('#slider1').data('AnythingSlider').goForward(function(){
return false;
});April 14, 2011 at 11:51 am #51292XaviJrParticipantThank you both, somehow this stopped making that behavior, maybe other script was making some sort of conflict.
I know have a little problem with pagination, it seems that it’s not working 100% well. I have 2 sliders, one with video and other with a photo gallery.
The video slider works fine, just have a little problem when i go back (on the first time i click it slides forward) but it’s not important.
The photo gallery is simply bad paginated. When i call
var current = $('#slider1').data('AnythingSlider').currentPage;
first page is getting 2, second page is getting 1. Weird..
April 18, 2011 at 1:11 pm #50440XaviJrParticipantI’m using the current version, i’ve downloaded again all the files and still is getting the pagination wrong.
But i was able to get things done using a javascript variable updated any time i call back or forward functions. :)
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.