Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

utility


Plugin Loader - Lightweight platform to easily track and load jQuery plugins and dependencies.

Plugin Loader is an extremely light weight platform for loading jQuery plugins as needed. It is ideal for tracking which plugins are loaded, loading plugins as needed, or just loading plugins withing a script without having to reference the complete path and file name.

Complete documentation and usage instructions are located at: http://code.google.com/p/pluginloader/

Urlize

Urlize

This plugin makes the urls in an element clickable.

To the urls clickable in a text element,

$( "#element_id" ).urlize( "http://ozanakcora.com/redirect.php?url=" );

the url's will be encoded and added to the base_name

getScriptLite

A light-weight plugin to get a remote script and execute it on the page through jQuery.

This is basically $.getScript() but with no callback method and with none of the overhead of an actual $.getScript() call. This is for when you just want to grab a remote script and throw it on the page.

Call by:

$.getScriptLite("yourScript.js");

fork me on github

Python like Zip() utility

This utility function mimics the Python function zip(). Usage is as such:

var arr1 = [1,2,3];
var arr2 = [4,5,6];
var zipped = $.zip(arr1,arr2); //{1:4,2:5,3:6}

The function will always return an object that is equal in length to the shortest array passed in, so:

var arr3 = [1];
var arr4 = [2,3,4];
var zipped = $.zip(arr3,arr4); //{1:2}

You can then use the $.each() method to loop through the created object.

jQuery Random Password Generator

This is a little jQuery utility function that generates random passwords of a given length. You can also supply optional second parameter to include special characters in your generated passwords.

$.password(8); // Generates: Yrc7TxX3
$.password(12, true); // Generates: C}4_ege!P&#M

Twitter API - jTwitter

UPDATE: Fixed small bugs and added demo page for jQuery Twitter plugin.

UPDATE: Added in version 1.1.0 an ability to specify and load any given number of twitter user posts. For more details see here.

Plugin provides you with an easy Twitter API to access Twitter user information by twitter username.

Here is an exaple usage:

// I am query data for "jQueryHowto" user
$.jTwitter('jQueryHowto', function(posts){

  //Callback functn with the user data
  $('#profile input.url').val(posts[0].user.url);

  $('#profile #avatar').html('<img src="'
       + posts[0].user.profile_image_url + '" />');
});

jQuery Plugin for Google Analytics

A useful jQuery plugin for dealing with Google Analytics tracking.
Allows you to more easily track page view and events on Google Analytics using jQuery.

This plugin will load the Google Analytics code 'google-analytics.com/ga.js' and allow you to setup automatic pageView calls for links with a ga-page class name. You can also provide a mapping for pageView calls based on specific selectors.

If you need to you can also take the manual approach and send pageViews or events from your own javascript.

Rich Array

Rich Array is a set of functions for working with JavaScript arrays. It contains functions for finding array intersections and differences, array filtering, mapping, getting duplicate-free version of the array and lots of others. Source code is self-documenting and well-commented, so you won't need to read any documentation. It was written with a purpose of getting rid of trivial tasks related to arrays.

Include file on demand

This tool include files(Javascript and / or CSS) in the head of the document and load. You can pass a single file or a array of files (can be mix of CSS or Javascript). You can passa a callback to execute some code after the script has loaded.

This plugin is useful for load scripts on demand or insert components for ajax calls.

The plugin checks if the file already exist before add and the callback for Style files wasn´t fully tested because of tricks of browsers*

Usage

Single javascript file

$.include('file.js');

Array of files

$.include(['file.js','file02.js']);

Even a mix of file

$.include(['script.js','style.css']);

You can specify the base path to be used in all calls of the plugin

$.includeBasePath = 'path/to/include';

You can have a callback to execute code when script has loaded