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
ol { | |
counter-reset: item; | |
margin: 0 0 20px 20px; | |
} | |
ol li { | |
display: block; | |
position: relative; | |
} |
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
<div class="r"> | |
<p>Name</p> | |
</div> | |
<form name="test"> | |
<select name="drop"> | |
<option>this</option> | |
</select> | |
<div> | |
<p>a something</p> | |
</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
<select> | |
<option value="" disabled selected>Select your option:</option> | |
<option value="One">One</option> | |
<option value="Two">Two</option> | |
<option value="Three">Three</option> | |
</select> |
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
// Sticky sidebar - JavaScript | |
'use strict'; | |
var fixedSidebar = { | |
init: function() { | |
// Set up the click handlers. | |
this.bindUIActions(); |
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).scroll(function(){ | |
// var adjustGlue = $('footer').offset(); | |
// var bottom = $(window).height() - setGlue.top - $('.content .page').height(); | |
// var bottom = $(window).height() + adjustGlue.top; | |
if (setGlue = bottom){ | |
$('.fixed-sidebar').removeClass('glue'); | |
$('.fixed-sidebar').addClass('glue-to-bottom'); | |
console.log('glued to the bottom'); |
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
// Using require.js | |
if(has('.fixed-sidebar')) { | |
// Global variable to find the correct value where fixed-sidebar resides at | |
var setGlue = $('.fixed-sidebar').offset().top; | |
$(document).scroll(function(){ | |
// Fetch the value from the browser's window | |
var windowTop = $(window).scrollTop(); |
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
RegEX - http://www.regexr.com/ | |
jQuery Validate - http://jqueryvalidation.org/ |
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
// Thanks to this site to help out on RegEx - http://www.regexr.com/ | |
require(["jQueryValidate"], function(){ | |
// dont allow < > # \ / | |
// add alphanumeric validator | |
jQuery.validator.addMethod("noSpecialCharacter", function(value, element) { | |
var regex = new RegExp("[<>#]+"); | |
var key = value; |
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
<div class="form-wrapper"> | |
<form action="registered-confirmed.php" novalidate="novalidate" class="registerInterest"> | |
<div class="row account-info"> | |
<fieldset> | |
<label for="Name">Name:</label> | |
<input type="text" title="Name" id="Name" value=""> | |
</fieldset> | |
<fieldset> | |
<label for="Position">Position:</label> | |
<input type="text" title="Position" id="Position" value=""> |