jQuery get the event when bootstrap modal is open?

How to get the event when Bootstrap modal is open? Many times we need the event for changing some information on modal┬ábefore modal display. So let’s see, How to get the jQuery event before modal is open.

First of all, we create the simple bootstrap modal.

Continue reading jQuery get the event when bootstrap modal is open?

AdminLte active current menu using JAVASCRIPT

AdminLte is the most popular and open source admin theme. many developers used AdminLte for developing admin panel. Many Developers use PHP if condition for active the current sidebar menu. It’s hard to manage with if condition when we have many sidebar menus.

I think we should use JAVASCRIPT for active the current menu for the sidebar. it’s too easy and simple js snippets.


    var url = window.location;
    // Will only work if string in href matches with location
    $('ul.nav a[href="'+ url +'"]').parent().addClass('active');

    // Will also work for relative and absolute hrefs
    $('ul.nav a').filter(function() {
        return this.href == url;

Just add above code into your javascript file. then checked the “active” class is add onto your current menu.