I have this jQuery code:
nextimg = $('.index-slide-container img#' + next);
nextcaption = $('.index-slide-container .index-slide').filter('#'+next);
nextimg.css({
'left':'100%',
'z-index':'99'
});
nextcaption.css({
'left':'100%',
'z-index':'99'
});
I want to know if you can somehow combine/chain the two .css functions into one?
You can use the jQuery add() function:
nextimg.add(nextcaption).css({
'left':'100%',
'z-index':'99'
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With