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 someParentElement = $('#id_of_parent'), | |
| someChildElement = $('#id_of_child'), | |
| theBodyElement = $('body'); | |
| if(theBodyElement.hasClass('some_class_on_the_body_element')) { | |
| someParentElement.find(someChildElement).append(function(){ | |
| $(this).attr('placeholder', 'Your Placeholder Text'); | |
| }); | |
| } | |
| })(jQuery); |
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
| $("#some-element").text(function(index, text) { | |
| return text.substr(0, 175); | |
| }); |
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
| $('.anchor-element').click(function(e){ | |
| e.preventDefault(); | |
| var jumpId = $(this).attr('href'); | |
| $('body, html').animate({scrollTop: $(jumpId).offset().top}, 'slow'); | |
| }); |
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
| $('textarea').keyup(function() { | |
| var characterCount = $(this).val().length, | |
| current = $('#current'), | |
| maximum = $('#maximum'), | |
| theCount = $('#the-count'); | |
| current.text(characterCount); | |
| /* ===| This isn't entirely necessary, just playin around |=== */ |
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
| RewriteCond %{HTTP_HOST} ^www.example.com [NC,OR] | |
| RewriteCond %{HTTP_HOST} ^www.example.org [NC] | |
| RewriteRule ^(.*)$ http://www.example.net/$1 [L,R=301] |
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
| var isMobile = { | |
| Android: function() { | |
| return navigator.userAgent.match(/Android/i); | |
| }, | |
| BlackBerry: function() { | |
| return navigator.userAgent.match(/BlackBerry/i); | |
| }, | |
| iOS: function() { | |
| return navigator.userAgent.match(/iPhone|iPad|iPod/i); | |
| }, |
OlderNewer