10 examples of 'location href jquery' in JavaScript

Every line of 'location href jquery' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
37function redirectbasehref(el, responseText) {
38 var mo = responseText.match(/
17function locationHashChanged () {
18 if (window.location.hash === '#all' || window.location.hash === '') {
19 showAll()
20 } else {
21 filterCategory(window.location.hash.substr(1))
22 }
23}
231function after_setWindowLocation(win, url) {
232 goog.dom.safe.setLocationHref(win.location, url);
233}
182function createHref(location) {
183 return createPath(location);
184}
76function createHref(location) {
77 return history.createHref(resolveLocation(location));
78}
42function __carrotware_SetJQueryURL(jqPath) {
43 jqURL = jqPath;
44
45 __carrotware_LoadJQuery();
46}
155updateLocation(window, url) {
156 if (window === this.current)
157 this.current.url = url;
158 window.document._URL = url;
159 window.document._location = new Location(this, url);
160}
131function addHashIfNeeded(href) {
132 if (sniffer.history) {
133 return href;
134 }
135 var index = href.indexOf('#');
136 if (index===-1) {
137 return href+'#';
138 }
139 return href;
140}
4function loc(href){
5 var a = document.createElement('a');
6 var self = {
7 replace: function(href) {
8 a.href = href;
9 Regular.util.extend(this, {
10 href: a.href,
11 hash: a.hash,
12 host: a.host,
13 fragment: a.fragment,
14 pathname: a.pathname,
15 search: a.search
16 }, true)
17 if (!/^\//.test(this.pathname)) this.pathname = '/' + this.pathname;
18 return this;
19 },
20 history: {
21 replaceState: function(obj, title, path){
22
23 self.replace(path)
24 // a.href = path
25 },
26 pushState: function(obj, title, path){
27 self.replace(path)
28 }
29 }
30 }
31 return (self).replace(href)
32}
196resolveHref(el) {
197 if (!el) {
198 return null;
199 }
200 const closestHrefEl = el.closest('[href]');
201 return closestHrefEl ? closestHrefEl.getAttribute('href') : null;
202}

Related snippets