I am trying to change the left padding value of the div class switch-selection in JavaScript. The following from my JavaScript function changes all values.
var ind = 1; //getting index from php variable '1' is just an example
$(".switch-selection").css("paddingLeft","60px");
I need to change only the value of the current index value. I have tried:
$(".switch-selection")[ind].css("paddingLeft","60px");
But that gives me an error. Am I missing something?