- Posts: 8
- Thank you received: 0
Changing background space between single images
-
Jens_K
Inactive member - Topic Author
- New Member
Less
More
13 years 6 months ago #9009
by Jens_K
Changing background space between single images was created by Jens_K
Hi!
Is there a way to change the space between the single images, so that they are attached directly to eachother?
Jens
Is there a way to change the space between the single images, so that they are attached directly to eachother?
Jens
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
13 years 6 months ago #9028
by ivan.milic
Replied by ivan.milic on topic Re: Changing background space between single images
You can make that by changing js/scripts.js in module directory:
find this in init function:
...
for (var i = 0; i < slider.num; i++) {
jQuery('#' + d.id).css({
left: ((i - pos) * 1000)
});
...
and this in slide: function :
...
for (var i = 0; i < slider.num; i++)
jQuery('#' + d.id).stop().animate({
left: ((i - pos) * 1000)
},
1000, 'swing');
...
notice this line in both snippets:
left: ((i - pos) * 1000)
you can change 1000 to width of yor images , or even better change them like this:
left: ((i - pos) * jQuery('#' + d.id).innerWidth())
find this in init function:
...
for (var i = 0; i < slider.num; i++) {
jQuery('#' + d.id).css({
left: ((i - pos) * 1000)
});
...
and this in slide: function :
...
for (var i = 0; i < slider.num; i++)
jQuery('#' + d.id).stop().animate({
left: ((i - pos) * 1000)
},
1000, 'swing');
...
notice this line in both snippets:
left: ((i - pos) * 1000)
you can change 1000 to width of yor images , or even better change them like this:
left: ((i - pos) * jQuery('#' + d.id).innerWidth())
The following user(s) said Thank You: Jens_K
Please Log in to join the conversation.
Time to create page: 0.156 seconds