A little jQuery to JS Help Please


(Brandon Scott Corlett) #1

I’m working on a project and for a completely obscure reason, I can’t use jQuery. Can anyone help translate this into JavaScript? I got myself lost. :slight_smile:

Cheers!

$( '#sidebar .navbar-nav a' ).on( 'click', function () {
  $( '#sidebar .navbar-nav' ).find( 'li.active' ).removeClass( 'active' );
  $( this ).parent( 'li' ).addClass( 'active' );
});
     $('.child').hide();
    $('.parent').click(function() {
        $(this).siblings('.parent').find('ul').slideUp();
        $(this).find('ul').slideToggle();
    });

(system) #2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.