background preloader

Cool jQuery Animations

Cool jQuery Animations

How to Create a jQuery Image Cropping Plugin from Scratch – Part II Web applications need to provide easy-to-use solutions for uploading and manipulating rich content. This process can create difficulties for some users who have minimal photo editing skills. Cropping is one of the most used photo manipulation techniques, and this step-by-step tutorial will cover the entire development process of an image cropping plug-in for the jQuery JavaScript library. A Quick Recap In the previous tutorial, we reviewed: how to extend jQuery how to make a plug-in more flexible by using custom options how to create basic image cropping application Today, we'll take things further and wrap up our plug-in: we'll define more custom option, add callbacks, make the selection draggable and resizable, build a preview pane and a size hint and write some server-side code to crop the image. Step 1: Adding More Options Open your jquery.imagecrop.js file located at /resources/js/imageCrop/and add the following code: We've added more options and two callbacks, onChange and onSelect.

A Simple jQuery Stylesheet Switcher There are lots of reasons you might want to offer your users more than one CSS file for your website: You want to offer a “stylish” low-contrast and an easy-to-read high-contrast version of your site.You have many low-vision readers and want to give them easy access to a customized stylesheet with a larger typeface.Your site is schizophrenic and you want to be able to change the look quickly. Whatever the reason, it’s amazingly easy to create a function that swaps between multiple stylesheets using jQuery. The first step of course is to build several different CSS files, which we’ll then swap between. Once that is done, we can dive into the XHTML and jQuery that makes the magic happen. The XHTML First, we need to create a set of links that will allow the user to swap between CSS files. Here I have three links, each with a “rel” attribute indicating which CSS file the link will load. The jQuery Like I promised, the jQuery is really simple: $("link.changeme").attr("href",$(this).attr('rel'));

jQuery 1.5.2 RC 1 Released Progress is moving along well on the second update of jQuery 1.5 – we’re pleased to announce the release of its first release candidate! Barring any major bugs this should be the code that we end up shipping for jQuery 1.5.2 (which will be happening on March 31st). jQuery 1.5.2 Release Candidate 1 You can get the code from the jQuery CDN: You can help us by dropping that code into your existing application and letting us know that if anything no longer works. We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. jQuery 1.5.2 RC 1 Change Log The current change log of the 1.5.2 release. #6158 Fixed replaceWith from throwing errors on non existant elements.#7340 We now use a single capturing handler to simulate bubbling focusin/focusout event on non-IE browsers.

Building a Simple PHP Mailing List Building a Simple PHP Mailing List In this tutorial I will be showing you how to build a PHP mailing list web app. In this web app, users will be able to sign up. Databases We are going to need two databases for this system. After running that code you will have two tables one for subscribers that has an ID, email address and a unsubscribe fields (with ID as the primary key and set to auto increment). Connecting to the database Create a directory “functions” and within that two files “function.php” and “config.php”. If you load that page and don’t see anything you have successfully connected to your database. Now create a CSS directory and add a reset CSS file (you can find them online, though this is optional) and a file main.css. Javascript This javascript file will listen for a submit on the form then post the data to our adder php file using jQuery/AJAX. Adding the user Create a file “add.php” where the javascript will post to. Admin pages Login Open the login.php file and add Logging Out

jQuery: The Write Less, Do More, JavaScript Library jQuery 1.6.2 Released jQuery 1.6.2 Released jQuery 1.6.2 is now out! This is the second minor release on top of jQuery 1.6 and lands a number of fixes for bugs. As usual, we provide two copies of jQuery, one minified and one uncompressed (for debugging or reading). jQuery Minified (for production)jQuery Regular (for development and testing) You can feel free to include the above URLs directly into your site and you will get the full performance benefits of a quickly-loading jQuery. You can help us by dropping that code into your existing application and letting us know that if anything no longer works. We want to encourage everyone from the community to try and get involved in contributing back to jQuery core. jQuery 1.6.2 Change Log The current change log of the 1.6.2 release. Attributes Core #7557: outerWidth()#9237: .css() doesn’t work with relative values on hyphenated properties Dimensions #9300: outerWidth(true) issue Effects Event #9285: custom trigger Manipulation Support

15 jQuery slideshow/gallery plugins Subscribe by RSS or Email 15 jQuery slideshow/gallery plugins Posted In: Gallery, Jquery, By WAD, 57 Comments advertisement advertisement Revisited To choose best jQuery slideshow or gallery plugins can be difficult. Below are the most aesthetic, innovative and creative jQuery plugins. 1. Nivo slider 2. Coin slider 3. jbgallery 2.0 jbgallery 2.0 4. jQuery.popeye 2.0 jQuery.popeye 2.0 5. jqFancyTransitions jqFancyTransitions 6. A Zoomable jQuery Image Gallery Called jPhotoGrid 7. AnythingSlider jQuery Plugin 8. Creating a Slick Auto-Playing Featured Content Slider 9. GalleryView 10. Easy Slider 11. Galleria 12. Imageflow 13. jFlow jFlow 14. Supersized 15. Gallerific 16. S3 Slider 17. Slider gallery 18. Creating an Image Slider 19. Create a Beautiful jQuery Slider Tutorial 20. Sliding Boxes and Captions with jQuery Tutorial 21. jQuery Cycle jQuery Cycle Take advantage of this free wordpress cheatsheet and wordpress theme perfect for your website. Posted In: Gallery, Jquery Share This Story? Choose Your Platform! Next Post

The Tapir's Tale: jQuery Changes From 1.4.2 to 1.6 jQuery is a powerful library and it is possible to get by without using any of the new features. That’s why many of us just upgrade to a new version assuming that it is mostly bug and performance fixes. This is not the case. jQuery 1.4.2 was released in February 2010 and it’s been one and a half years and a number of releases since then. I was going to write about the changes in 1.5 and 1.6, but I have noticed that many people have missed some of the new features of the 1.4 releases. And by the way, all examples are written in Coffeescript. delegate() Most people know about live() and how it can be used to attach listeners to elements that don’t yet exist in the DOM. live() has a younger brother that was born in 1.4.2 and he is called delegate(). delegate() is more powerful. $('.main-content').find('section').delegate 'p', 'click', -> $(this).addClass 'highlight' As you can see above, delegate(), unlike live(), can be chained like normal jQuery calls. Deferred() Very nice!

JavaScript Trie Performance Analysis After my last post discussing dictionary lookups in JavaScript the unanimous consensus seemed to be that utilizing Trie would result in additional space savings and yield performance benefits. A Trie is a relatively simple data structure. At its simplest form you’re building a tree-like structure where each final leaf results in a complete word. This allows for some very efficient use of file size – reducing common prefixes in words quite easily. I looked through a number of JavaScript Trie solutions and yet was not terribly pleased with them. They were either total overkill (including large object structures and functionality far beyond what I needed) or weren’t compressing the resulting data structure enough. I’ve dumped my work-in-progress JavaScript Trie Generator up on Github (note that it requires Node.js to run). Generating a Trie The basic Trie generation functionality is as follows (note that I use ’0′ or ‘$:0′ to indicate a complete word): Optimizing the Structure Finding a Word

Find the jQuery Bug #1: Chicken or the Egg Introduction In this open-ended series I'll be showcasing a snippet of buggy jQuery code that you might encounter, explain what the problem is, and then identify how you can easily resolve the issue. As this series progresses my example code may not use all the best practices that I would normally use in my everyday development. The Desired Feature You have a list of individuals in a table. When the trash icon is clicked, a request goes to the server to delete that individual by it's ID. The following code was inspired by an issue a friend of mine, Casey Picker from LamplightMedia.net, had last week and I helped him isolate the problem. The Buggy Code The Unexpected Result When you execute the above code you'll notice that when you delete one of the rows the alternating background colors get all out of sync. The Underlying Problem Since the row that is being deleted is happening in the success callback function It seemed logical to put the zebraTable call in the complete callback function.

Orbit: jQuery Image Slider Plugin from ZURB - ZURB Playground - ZURB.com 1.3.0 (1/25/2012): Add custom events to allow control via custom JavaScript. Fixed intermittent loading issue on Chrome. Fixed IE issues. 1.2.3 (3/17/2011): Fixed a number of issues including: Fixed issue of false parameters failingCan now have just 1 slide without it failingReorganized kit download to isolate "demo" pieces and core codeIncluded jQuery 1.5.1We've edited some of the docs here around "Content" slides 1.2.1 (2/3/2011): Changed caption styles to not break on different sized sliders and added documentation in here about positioning other than relative. 1.2 (1/20/2011): Content compatible, new loading animation, thumbnail navigation for bullets, animated captions, no more overflow hidden on the container, restructured the markup & js, changed the base UI, added callback, mouseover pause, better timer interactions and re-browser tested. 1.1 (9/4/2010): Added bullet navigation, linkable images, full HTML captions, a loading animation and greater browser compatibility.

JQuery Primer - Part 2 Build highly reusable JavaScript components by leveraging JQuery's simple plug-in architecture. Introduction In part 1 we looked at two of the three core JQuery abilities: DOM traversal and manipulation. In this part we'll look at the third: extensibility. In fact, one might worry that given JQuery's focus on core functionality, more advanced use might be limited. Guidelines Before we build our first plug-in, the JQuery team has a few recommended best-practices for plug-in authors. Numeric Mask Plug-in For our plug-in, we’ll stick with a simple example: applying a numeric mask. 1.jQuery.fn.numeric = function(){}; With this simple code in place, we can attach our function to any JQuery objects: 2. 4. Of course, our plug-in doesn't do anything yet. 2.jQuery.fn.numeric = function(){return this;} ; And the best way to make sure our mask is applied to any number of matched elements is to use the each iterator: 1.jQuery.fn.numeric = function() 3. this.each(function() 3. return this.each(function() 05. 1.

Related: