I’ve probleme with
$pagContainer = $(sets.lists.container); // container: 'cart'
$bg = $($pagContainer + " li").css("background", "#FFFFFF");
$bg1 = $($pagContainer + " li:nth-child(2n)").css("background", "#767676");
I don’t know if I need to put “#” before the $pagContainer like:
$pagContainer = $(sets.lists.container); // container: 'cart'
$bg = $("#" + $pagContainer + " li").css("background", "#FFFFFF");
or something like that.
who can be help me with this issue?
Thanks,
If
sets.lists.containercontains a reference to a DOM element, or a selector in the form#my_id, then$pagContainerwill already be a jQuery object, and cannot be used as a selector. In this case, you can use.find: