jquery - Adding reg exp in javascript to determine if url has any character after / -
i'd add regex determine if url contains character after "/" in url. right regex looking "a". can't seem concatenation of regular expressions work.
$(function() { if ( document.location.href.indexof('services/a') > -1 ) { $(window).scrolltop(450) } });
you can use:
var b = /services\/./.test( document.location.href ); if (b) alert("there character after services/");
Comments
Post a Comment