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-content").load("process.php"); | |
| var refreshId = setInterval(function() | |
| { | |
| $("#ajax-content").load("process.php"); | |
| }, 5000); // 5 seconds |
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 preload(arrayOfImages) | |
| { | |
| $(arrayOfImages).each(function(){ | |
| $('<img/>')[0].src = this; | |
| // Alternatively you could use: | |
| // (new Image()).src = this; | |
| }); | |
| } | |
| // Usage: | |
| preload([ |
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
| $('.btn').click(function(){ | |
| var inputs = $('[type=text]'); | |
| var pw = $('[type=password]'); | |
| var checkboxes = $('[type=checkbox]:checked'); | |
| var selects = $('option:selected'); | |
| // next translate that into an array of just the values | |
| var password = $.map(pw, function(elt, i) { | |
| return $(elt).val(); | |
| }); |
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
| // controls character input/counter | |
| $('textarea#body').keyup(function() { | |
| var charLength = $(this).val().length; | |
| // Displays count | |
| $('span#charCount').html(charLength + ' of 250 characters used'); | |
| // Alerts when 250 characters is reached | |
| if($(this).val().length > 250) | |
| $('span#charCount').html('<strong>You may only have up to 250 characters.</strong>'); | |
| }); |
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
| // cursor to icon | |
| $('#canvas').mouseout(function(){ | |
| $('#mycursor').hide(); | |
| return false; | |
| }); | |
| $('#canvas').mouseenter(function(){ | |
| $('#mycursor').show(); | |
| return false; | |
| }); | |
| $('#canvas').mousemove(function(e){ |
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
| //http://forrst.com/posts/Making_a_page_slide_in_from_top_with_JQuery_sol-vmh | |
| $(document).ready(function(){ | |
| $("#master").css('top', '-100%').animate({ | |
| top: '0%' | |
| }, 100, 'easeOutElastic'); | |
| }); |
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
| /*==RESIZE CANVAS TO MAINTAIN PROPORTION ==*/ | |
| var fixDimensions = function(){ | |
| //Get the image dimensions: | |
| var image = { | |
| width: $("canvas").width(), | |
| height: $("canvas").height() | |
| }; | |
| //Get the page dimensions: |
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
| <!-- Place somewhere in the <head> of your document --> | |
| <link rel="stylesheet" href="flexslider.css" type="text/css"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
| <script src="jquery.flexslider.js"></script> | |
| <!-- Place in the <head>, after the three links --> | |
| <script type="text/javascript" charset="utf-8"> | |
| $(window).load(function() { | |
| $('.flexslider').flexslider(); | |
| }); |
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
| /* | |
| Plugin: Progressive Fade In | |
| Version: 1 | |
| Author: Tim Wright - csskarma.com | |
| Call: $(elems).progressiveFadeIn({ 'speedMultiplier': ###, 'fadeInSpeed': ### }); | |
| Options: speedMultiplier, fadeInSpeed | |
| URL: http://www.csskarma.com/lab/jquery.plugins/jquery.progressiveFadeIn.js | |
| */ | |
| (function ($) { |
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
| /* =========================================================================== | |
| * | |
| * JQuery URL Parser | |
| * Version 1.0 | |
| * Parses URLs and provides easy access to information within them. | |
| * | |
| * Author: Mark Perkins | |
| * Author email: mark@allmarkedup.com | |
| * | |
| * For full documentation and more go to http://projects.allmarkedup.com/jquery_url_parser/ |