Skip to content

Instantly share code, notes, and snippets.

@grippado
Created September 1, 2016 20:12
Show Gist options
  • Select an option

  • Save grippado/7ffa5cfbe65eb952d064d1cede02278e to your computer and use it in GitHub Desktop.

Select an option

Save grippado/7ffa5cfbe65eb952d064d1cede02278e to your computer and use it in GitHub Desktop.
(function($){
// var XX = 'modernos';
// var XX = 'presecxx';
// var XX = 'iconics';
// var XX = 'poscol';
//code here
$('nav .bullet').on('mouseenter',function(){
var classing = $(this).attr('data-bullet');
switch(classing){
case 'modernos':
$('ul li').not('.modernos').addClass('hiding');
break;
case 'presecxx':
$('ul li').not('.presecxx').addClass('hiding');
break;
case 'iconics':
$('ul li').not('.iconics').addClass('hiding');
break;
case 'poscol':
$('ul li').not('.poscol').addClass('hiding');
break;
}
})
.mouseleave(function(){
$('ul li').removeClass('hiding');
});
})(jQuery);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment