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
/** | |
* Validates if the input for password field matches requirements for password strength | |
* @returns {void} | |
*/ | |
function validatePassword() { | |
var inputValue; | |
var requirement = new RegExp("(^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[@#$%*]).{8,}$)"); | |
// clear previous | |
jQuery(".reg-validate-message").remove(); |
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
/** | |
* Validates if the input for email field matches requirements and if it's a valid email | |
* @returns {void} | |
*/ | |
function validateEmail() { | |
var inputValue; | |
// clear previous | |
jQuery(".reg-validate-email").remove(); | |
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
<!DOCTYPE html> | |
<!--[if lt IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie6"> <![endif]--> | |
<!--[if IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie7"> <![endif]--> | |
<!--[if IE 8 ]> <html dir="ltr" lang="en-US" class="no-js ie8"> <![endif]--> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7" /> | |
<title>Resizable user info bar</title> | |
<style type="text/css"> |
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
/* equivalent to li:nth-child(1) */ | |
#mainNav ul li:first-child a { | |
background: #1b77af; | |
width: 236px; | |
text-align: center; | |
margin-right: 10px; | |
} | |
/* equivalent to li:nth-child(2) */ | |
#mainNav ul li:first-child + li a { | |
background: #33a0ff; |
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
<?php | |
/* | |
* Available variables | |
* $query array current query from the URL | |
*/ | |
?> | |
<?php // dpm($query); ?> | |
<div id="search-products"> | |
<h2><?php echo t("Rechercher un produit");?></h2> | |
<form method="GET" id="search-form" action="catalog-search"> |
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
$(document).ready(function(){ | |
$('img').error(function(){ | |
$(this).attr('src', 'http://mysite/myimage.jpg'); | |
}); | |
}); |
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 zoomText = function (change) { | |
var fontSize, fonts, container; | |
container = $("#block-system-main"); | |
fontSize = Math.floor(parseFloat(container.css('font-size')) / 16); | |
fonts = ["1em", "1.2em", "1.4em"]; | |
if (change === -1 & fontSize > 0) { | |
fontSize--; | |
} |
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
<!doctype html> | |
<html ng-app="Time"> | |
<head> | |
<title>Time</title> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script> | |
</head> | |
<body> | |
<div ng-controller="MyController"> | |
<h1>{{ clock | date : 'medium' }}</h1> | |
</div> |
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
// development is a string containing the domain base of the dev site | |
// production is a string containing the domain base of the production site | |
function replaceDomains(development,production){ | |
var links = jQuery("a"); | |
for (var i = 0; i < links.length; i++) { | |
var href = jQuery(links[i]).attr("href"); | |
if ((href !== undefined) && (href.indexOf(production) > -1)) { | |
href = href.replace(production, development); | |
jQuery(links[i]).attr("href", href); | |
} |
OlderNewer