I am building a jquery slider, and i am having troubles with one global variable. I can not use it as local in my case. I am using multiple sliders on one page so this global variable EndPosition should be different from slider to slider.
$.fn.slider = function(id) {        
    var SliderID = id;
    EndPosition = (VisibleWidth - TotalWidth); //End position for sliding
Is there a way to pass an id to variable name, something like EndPosition+id so i can use it like that in other parts of code, for example here
if (NewPosition <= EndPosition+id){
                RightNav.addClass('disabled');    
            }
 
     
     
     
     
    