Creating a Jquery Plugin

by OMR 14. November 2009 04:56

This article contains plugin based coding tecniques for jquery. Lets coding.

We are declaring plugin functions to jquery prototype.

jQuery.fn.MyAlert = function(message)
{
        alert("Attention: " + message;      
}

This code is usable pluging declaretion but not supported tecnique for cross library safety. Example of cross library supported declaretion:


(function($) {
    $.fn.MyMask = function() {
        $(this).val("Masked input element");
    }
})(jQuery);

Examle using:
$("#input1").MyMask();

Finished first runable plugin. Plugin adding "Masked input element" to input1 element. This function is only available for an element. Selective parameter may apply to multiple elements. Be applied to all elements according to the selector parameter. Therefore we should use each function.

More...

Tags:

english | jquery

How to make a real cloud effects with jQuery.

by OMR 6. November 2009 19:55

In this article I used the cloud effect birdunyadusun.com site will explain the technique.
Some sites have similar made with Mootools. I did research in jQuery forum. No information about the coding of similar applications. This article has nothing to parallax technique. Let's start coding.
The following code will load the clouds just below is a description of the body.


<span id="spnCloudHolder"></span>

And using this javascript codes for generating clouds:


$(document).ready(function() {
    for (var i = 0; i < 3; ++i) {
        $("#spnCloudHolder").append("<img src=\"img/bulutcan12.png\" class=\"cloud\" />");
    }
});

 

You can use this image file(Transparent PNG, thanks AdmiX):

Output current screen:
More...

Tags: ,

english | jquery

ASP.NET Slider Control

by OMR 8. September 2009 10:32

Powerful ajax slider script in script.aculo.us . I created new asp.net slider component using this. Orjinal script.

ScreentShots:

 

Tags: , ,

asp.net | jquery

ASP.NET Image Croper Component with JCrop

by OMR 8. September 2009 10:25

JCrop is powerful image croper javascript tool. I created asp.net ajax control for jcrop and opened download. Follow the images. Jcrop is free software released under MIT License.

Save as croped area when clicked cropit button.

 

 

btnCropIt Click code example:

Image1.ImageUrl = “~/Uploads/Image/” + ImageCroper1.Crop(Server.MapPath(”Uploads/Image/”));

 

 

OmrCommon.rar (51,75 kb)

Tags: , ,

asp.net | jquery

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen