Skip to content

Instantly share code, notes, and snippets.

View johnnny-bravoo's full-sized avatar

Sohaib Raheem johnnny-bravoo

View GitHub Profile
@johnnny-bravoo
johnnny-bravoo / tabs
Created April 7, 2020 09:22
BS4 - Tabs
jQuery(".tab-pane").addClass("active").addClass("show");
jQuery(".nav-tabs .nav-link").on("click", function() {
console.log(this.hash);
jQuery(".tab-pane").not(this.hash).removeClass("active").removeClass("show");
});
@johnnny-bravoo
johnnny-bravoo / BS4-smooth_scroll.php
Last active April 6, 2020 18:07
Bootstrap4 Menu Smooth Scrolling
$('.dropdown').on('show.bs.dropdown', function(e){
$(this).find('.dropdown-menu').first().stop(true, true).slideDown(300);
});
$('.dropdown').on('hide.bs.dropdown', function(e){
$(this).find('.dropdown-menu').first().stop(true, true).slideUp(300);
});