I'm using the following script to toggle between divs. Functionally it works but I'm getting the following error when I check it: 'Unknown pseudo-class or pseudo-element 'eq'. Dangling combinator.'
$(document).ready(function() {
$('#slide2, #slide3').hide();
$('#navCol a').each(function(index) {
$(this).click(function() {
var $thisPanel = $('#slideContainer > div:eq(' + index + ')');
if ($thisPanel.siblings(':visible').length) {
$thisPanel.siblings(':visible').slideUp(250, function() {
$thisPanel.slideDown(250);
});
}
return false;
});
});
});
Can anyone tell me how to fix this or a better way to work this code? Thank you!