A Pen by Hugo Giraudel on CodePen.
This file contains 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
iframe { | |
max-width: 100%; | |
} |
This file contains 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
Suivant and Iron & Wool Mini-Basket | |
Replace: | |
<mvt:if expr="l.settings:item:subtotal_base_price OR l.settings:item:subtotal"> | |
<mvt:if expr="l.settings:item:subtotal_base_price NE l.settings:item:subtotal"> | |
<s>&mvt:item:formatted_subtotal_base_price;</s><br /> | |
</mvt:if> | |
<strong>&mvt:item:formatted_subtotal;</strong> | |
<mvt:else> | |
<strong>&mvt:item:formatted_subtotal_comprehensive;</strong> | |
</mvt:if> |
This file contains 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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains 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
<mvt:item name="html_profile" /> | |
<head> | |
<mvt:if expr="NOT ISNULL l.settings:page:title"> | |
<title>&mvt:page:title;</title> | |
<mvt:else> | |
<title>&mvt:store:name;: &mvt:page:name;</title> | |
</mvt:if> | |
<mvt:item name="head" param="head_tag" /> | |
<mvt:item name="attributemachine" param="head" /> | |
<mvt:item name="product_display_imagemachine" param="head" /> |
This file contains 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
var div = $('<div/>'); | |
function encodeEntities(str) { | |
return div.text(str).html(); | |
} | |
function decodeEntities(str) { | |
return div.html(str).text(); | |
} |
This file contains 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
$(window).bind("load", function() { | |
// IMAGE RESIZE | |
$('#product_cat_list img').each(function() { | |
var maxWidth = 120; | |
var maxHeight = 120; | |
var ratio = 0; | |
var width = $(this).width(); | |
var height = $(this).height(); | |
if(width > maxWidth){ |
This file contains 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
var loading = false; | |
$(window).scroll(function(){ | |
if((($(window).scrollTop()+$(window).height())+250)>=$(document).height()){ | |
if(loading == false){ | |
loading = true; | |
$('#loadingbar').css("display","block"); | |
$.get("load.php?start="+$('#loaded_max').val(), function(loaded){ | |
$('body').append(loaded); | |
$('#loaded_max').val(parseInt($('#loaded_max').val())+50); | |
$('#loadingbar').css("display","none"); |
This file contains 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
$('#pass').keyup(function(e) { | |
var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\W).*$", "g"); | |
var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g"); | |
var enoughRegex = new RegExp("(?=.{6,}).*", "g"); | |
if (false == enoughRegex.test($(this).val())) { | |
$('#passstrength').html('More Characters'); | |
} else if (strongRegex.test($(this).val())) { | |
$('#passstrength').className = 'ok'; | |
$('#passstrength').html('Strong!'); | |
} else if (mediumRegex.test($(this).val())) { |
This file contains 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 parseJson(){ | |
//Start by calling the json object, I will be using a | |
//file from my own site for the tutorial | |
//Then we declare a callback function to process the data | |
$.getJSON('hcj.json',getPosts); | |
//The process function, I am going to get the title, | |
//url and excerpt for 5 latest posts | |
function getPosts(data){ | |
OlderNewer