I am a bit puzzled about when to include the period before referencing class names. For instance, in this code snippet, why is a period included before the first use of the 'active-slide' class but not for the other two instances?
var primary = function(){
$('.dropdown-toggle').click(function(){
$('.dropdown-menu').toggle();
});
$('.arrow-next').click(function(){
var currentPanel = $('.active-slide'); //includes period
var nextPanel = currentSlide.next();
currentSlide.fadeOut(600);
currentSlide.removeClass('active-slide'); //no period
nextPanel.fadeIn(600);
nextPanel.addClass('active-slide'); // no period
});
}
$(document).ready(primary);