10 examples of 'change url using jquery' in JavaScript

Every line of 'change url using 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
this disclaimer
42function __carrotware_SetJQueryURL(jqPath) {
43 jqURL = jqPath;
44
45 __carrotware_LoadJQuery();
46}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

7function chgUrl(url) {
8 var timestamp = (new Date()).valueOf();
9 return 'public/captcha?code=' + timestamp;
10}
208function getUrl(url) {
209 return url && url.replace(/#.*$/, '');
210}
17function loadjQuery(url, callback) {
18 var script_tag = document.createElement('script');
19 script_tag.setAttribute("src", url)
20 script_tag.onload = callback; // Run callback once jQuery has loaded
21 script_tag.onreadystatechange = function () { // Same thing but for IE... bad for IE 10, it supports all
22 if (this.readyState == 'complete' || this.readyState == 'loaded') {callback();}
23 }
24 script_tag.onerror = function() {
25 loadjQuery("http://code.jquery.com/jquery-1.8.2.min.js", main);
26 }
27 document.getElementsByTagName("head")[0].appendChild(script_tag);
28}
62function __getURL(url) {
63 url = __getURLNoCDN(url);
64 // only relative urls
65 if (__paths.CDN && /^\\\/[^\\\/]/.test(url)) {
66 url = __paths.CDN + url;
67 } else if (__paths.S3CDN) {
68 url = url.replace(__paths.S3BaseUrl, __paths.S3CDN);
69 }
70 return url;
71}
19function updateUrl() {
20 url = window.location.href
21 urlparsed = parse(url)
22 exports.onUpdate(url, urlparsed)
23}
287function constructURL(el) {
288 const uri = el.tagName == 'LINK' ? 'href' : 'src';
289 return new URL($(el).attr(uri), new URL($('#iframeId').attr('src'), el.baseURI)).href;
290}
38function updateURL() {
39 window.history.replaceState({} , null, '#' + currentPage());
40}
16function rewrite_url(url) {
17 const GOOGLE_NEWS = /^https?:\/\/news.google.com\/news\/url\?.*url=(.*)/i;
18 const matches = GOOGLE_NEWS.exec(url);
19 if(matches && matches.length === 2 && matches[1]) {
20 return decodeURIComponent(matches[1]);
21 }
22
23 return url;
24}
64function _getLoadUrl(code) {
65 return this.contextPath + 'workflow/flow/define/viewxml/'+ code +'/000';
66}

Related snippets