I am using the following code. It works perfectly in browsers such as Chrome, Firefox or Edge. However when I check in IE11 it does not work and breaks all the functionality.
var href = jQuery(this).attr('href');
if (href.includes('#')) {
// action
}
I think includes()
does not work in IE11. Is there a solution for this?