background preloader

$

Facebook Twitter

A Really Simple jQuery Plugin Tutorial. 1.

A Really Simple jQuery Plugin Tutorial

Introduction Creating a jQuery Plugin is an advanced topic for a jQuery beginner. This month, I have been playing with jQuery intensively. Though I have learnt how to separate the javascript code from html document, I ain't satisfy yet. Whenever I look at my javascript file, it's messy. This plugin is based on my previous tutorial - Navigation List menu + jQuery Animate Effect Tutorial . But now, I want it to display something like this: It looks much more better, and easier to reuse this script for another project. 2. jQuery website has provided a very detailed explanation in Plugins/Authoring page. Alright, to make your life easier, I did some research online, the following snippet will be a good structure to write a plugin. 2. If you look at step one - Introduction, the "padding" value for this plugin is user configurable.

jQuery Plugin Development – 10 Tutorials To Get Started. jQuery, one of the most popular JavaScript library, has a huge selection of plugins which makes it more powerful.

jQuery Plugin Development – 10 Tutorials To Get Started

On the other hand, there are much more codes/modules, from simple alert functions to complex galleries/form validation methods, that are hard-coded inside websites & not converted to plugins. For sure, not every code must become a plugin, that would be meaningless. But converting the ones to be re-used will save a lot of re-development time & if shared with the community, will make the code itself better. jQuery offers an easy to learn & flexible environment for creating plugins. Here are 10 tutorials to get you started: Why Create A jQuery Plugin? James Padolsey discusses the need & reasons for creating a jQuery plugin. He clearly puts of the advantages provided like portability, time to be gained & more. Plugins/Authoring From jQuery.com The first stop for everyone planning to create a jQuery plugin.

It covers the logic, naming patterns & steps like: Tutorials. Realtime Chat with Node.js By Nick Anastasov | In this tutorial, we are going to build a realtime chat system with Node.js, Express and the socket.io library.

Tutorials

Visitors will be able to create private rooms in which they can chat with a friend. Read more My New Favorite Technique ForHiding Overflowing Text By Martin Angelov | In this short tutorial, I will show you my new favorite technique which fades overflowing text gracefully into the background – a perfect addition to your new design. Timeline Portfolio. Timeline is a jQuery plugin specialized in showing a chronological series of events.

Timeline Portfolio

You can embed all kinds of media including tweets, videos and maps, and associate them with a date. With some design tweaks, this will make it perfect for a portfolio in which you showcase your work and interests. The HTML Timeline comes with a light colored theme by default. It is perfectly usable and in most cases would be exactly what you need. First, let's look at the basic layout of the page: index.html <! In the head section, we have the plugin's stylesheet - timeline.css, and styles.css, which will hold our customizations. When we call the plugin, it will search for a div on your page with the ID of timeline. <div class="container main" id="timeline"><div class="feature slider" style="overflow-y: hidden;"><div class="slider-container-mask slider-container slider-item-container"><!

As we will be modifying the CSS of the timeline, the fragment above will give you a better idea of the customizations. Timeline JS - Beautifully crafted timelines that are easy, and intuitive to use. 15 Powerful jQuery Tips and Tricks for Developers. Martin Angelov In this article we will take a look at 15 jQuery techniques which will be useful for your effective use of the library.

15 Powerful jQuery Tips and Tricks for Developers

We will start with a few tips about performance and continue with short introductions to some of the library’s more obscure features. 1) Use the Latest Version of jQuery With all the innovation taking place in the jQuery project, one of the easiest ways to improve the performance of your web site is to simply use the latest version of jQuery.

Every release of the library introduces optimizations and bug fixes, and most of the time upgrading involves only changing a script tag. You can even include jQuery directly from Google’s servers, which provide free CDN hosting for a number of JavaScript libraries. The latter example will include the latest 1.6.x version automatically as it becomes available, but as pointed out on css-tricks, it is cached only for an hour, so you better not use it in production environments. 2) Keep Selectors Simple 7) Use CSS Hooks. jStorage - simple JavaScript plugin to store data locally.