Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

tab change hash

// jquery
$('a').on('click', function (e) {
    e.preventDefault();
    let link = $(this).attr('href');
    if (link.includes('#') !== false) {
    window.location.hash = this.hash.substr(1);
	}
});
Comment

tab change hash

$(document).ready(function() {
        if (window.location.hash) {
            let hash = window.location.hash;
            $('.nav-link').removeClass('active');
            $('.tab-pane').removeClass('active');
            $('.nav-link[href="' + hash + '"]').click();
        }
    });


    $('.nav-tabs a').on('click', function() {
        window.location.hash = $(this).attr('href');
    });
Comment

PREVIOUS NEXT
Code Example
Javascript :: erpnext date difference client script 
Javascript :: test command in node js 
Javascript :: a7aad 
Javascript :: object.keys map 
Javascript :: react proxy to flask server 
Javascript :: array destructuring in js 
Javascript :: redux counter 
Javascript :: generator object loop over length 
Javascript :: add a cookie value on postman 
Javascript :: onclick clear input field javascript 
Javascript :: minus converter 
Javascript :: redux extension link 
Javascript :: react pass object to state 
Javascript :: cypress replace response part 
Javascript :: desc sorting in array of objects javascript 
Javascript :: copy current filename in emacs 
Javascript :: react router v6 wrapped routes in separate files 
Javascript :: How can I use a regex variable in a query for MongoDB 
Javascript :: blockchain.info/pushtx/ 
Javascript :: how to create a tag object in jQuery 
Javascript :: styling font awesome icons next js 
Javascript :: Function Returning Object Saved To A Variable 
Javascript :: react using pre new Date 
Javascript :: metadata parser react 
Javascript :: jqxAngular 
Javascript :: santance case in javascript 
Javascript :: map function usage in frontend 
Javascript :: populate strapi v4 
Javascript :: load image file input jquery 
Javascript :: cefsharp transparent background 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =