This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.greenify = function() { | |
this.css( "color", "green" ); | |
}; | |
$( "a" ).greenify(); // Makes all the links green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: "POST", | |
url: "https://www.test.co.uk/testquote/PersonalDetailsRequest", | |
data: { | |
EmailAddress: email, | |
EnquiryPageName: "", | |
EnquirySource: "", | |
EnquiryType: "", | |
FirstName: firstName, | |
LastName: lastName, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add this to Profile Script | |
var strIp= user.header('x-cluster-client-ip'); | |
var res = /^(119.148.14.249)$/.test(strIp); | |
if (res){ | |
return 'Valid IP'; | |
}else{ | |
return 'Invalid IP' ; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CUSTOM JS TARGETING OF MUTUALLY EXCLUSIVE EXPERIMENTS | |
* | |
* Traffic allocation weighting is confined to the context of each | |
* individual experiment. In other words, each experiment has an | |
* equal chance of bucketing the visitor, regardless of if the | |
* chosen experiment has a large exclusion percentage due to | |
* traffic allocation. | |
*/ | |
expArray = [34380472429,34393076390]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Closure | |
function makeFunc(){ | |
var name = "shuvo"; | |
function takeData(){ | |
console.log("My Name is " + name); | |
} | |
return takeData; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function screenClass() { | |
if($(window).innerWidth() > 767) { | |
} | |
} | |
screenClass(); | |
$(window).bind('resize',function(){ | |
screenClass(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var isIntervals = setInterval(function () { | |
// GLOBAL VARIABLES | |
var jQuery = window.jQuery; // JQUERY | |
window.optimizely = window.optimizely || []; // OPTIMIZELY | |
if (jQuery !== undefined && window.optimizely !== undefined) { | |
var scrollFifty = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.row.make-columns { | |
-moz-column-width: 19em; | |
-webkit-column-width: 19em; | |
-moz-column-gap: 1em; | |
-webkit-column-gap:1em; | |
} | |
.row.make-columns > div { | |
display: inline-block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
/* Create three equal columns that floats next to each other */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#squaredTwo").click(function(){ | |
if(jQuery(this).val() === "unchecked") { | |
$(this).attr('value', 'checked'); | |
console.log(jQuery("#squaredTwo").val()); | |
} else { | |
$(this).attr('value', 'unchecked'); | |
console.log(jQuery("#squaredTwo").val()); | |
} | |
}); |