jquery - increase Left property dynamicaly -


i have made image slider in images placed calculating

image.pc = my.percentlandscape; image.style.left =  xs - (image.pc / 2) / z * my.size +'px'; 

i want increase gap between images enter image description here. how dynamically calculate value left property.

i using imageflow http://finnrudolph.de/imageflow/introduction

have tried modifying css?

.imageflow img { margin: 0 50px;} 

this seems worked when tried modify css directly on website

edit

sorry solution above wrong, downloaded plug-in , looked in details. because each images absolute position , position dynamically calculated, have modify javascript have more spaces.

if have site uploaded somewhere, can more details sample can download web site, can edit following code in javascript

file: imageflow.js

line: 583: image.style.left = xs - (image.pc / 2) / z * my.size + (50 * index) + 'px'; 

i've added

(50 * index) 

so have 50 more pixels between each images.

edit 2

because of changes made in first edit, has shifted image right. need re-calculate displayed index vs hidden index.

in line 543, added following line

/* main loop */ var firstimageindex = -1;   <---------------------------------this 1 (var index = 0; index < my.max; index++) 

then in line 560, added following line

else {    if (firstimageindex < 0)  <---------------------------------this line       firstimageindex = index; <-------------------------------this line     var z = (math.sqrt(10000 + x * x) + 100) * (my.imagesm + 5);    var xs = x / z * my.size + my.size; 

then on line edited in edit 1, change logic following

image.style.left = xs - (image.pc / 2) / z * (my.size - 50) + (10 * (index - firstimageindex)) + 'px'; 

let me know if confusing, or doesn't work, i'll send javascript edited.

good luck

edit 3 i've made few modification, location of these codes same edit 2 area.

first section     /* main loop */     var firstimageindex = -1;     var scalelevel = 5; // higher number, scale smaller     var extraspacebetweenimage = 100; //extra space between images measured px     var shiftleftlevel = 4; // shift image element left, 

2nd section

if (firstimageindex < 0)      firstimageindex = index;  var z = (math.sqrt(10000 + x * x) + 100) * (my.imagesm + scalelevel); 

3rd section

image.style.left = xs - (image.pc / 2) / z * (my.size - 50) + (extraspacebetweenimage * (index - firstimageindex - shiftleftlevel)) + 'px'; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -