Archive for category Javascript

jQuery Fancy Custom Radio-button and Checkbox

Fancy Radio-button and Checkbox

Fancy Radio/ Checkbox

I have written a jQuery Plugin for Fancy Custom Checkbox and Radio-buttons. To make form elements visually more expressive. I required this for one of my project and later on I have rewritten it completely to make it more generic and easier for jQuery Lovers. I am great fan of jQuery and I am inspired by http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/ to write this plugin.

It's fairly easy to use just like any other jQuery plugin you just have to write couple of lines of javascript code and add some CSS to your html.

Javascript You need:

$(document).ready(function(){
	$(".radio").dgStyle();
	$(".checkbox").dgStyle();
});

Read the rest of this entry »

Tags: , , ,

Calculate Date/Time difference – Simple Javascript code snippet

It's very often we come across requirement when we need to calculate time difference between two dates in Javascript. Here is a simple Javascript function which can do it in quick and dirty way :)

Dirty because I would have to say because I would have made it little more generalized by provide options and formats which convert string to date automatically..!

Anyway for that matter I would rather suggest using php.js which is interesting and helpful library which let's us use lot of PHP functions in Javascript.. It includes hundreds of useful and handy functions which we are used to while we develop PHP Applications.

This simple functions takes only 2 arguments as Javascript Date objects and in return provides an object with days, hours, minutes and seconds as the property in difference between these 2 date provided as parameter to function.

Here is the code for simple Date-time difference calculation:
Read the rest of this entry »

Tags: , ,

jQuery 1.4 Released – jQuery UI has yet to achieve compatibility with it…

Last week jQuery 1.4 is released with a new website for the version. Lot of code has been rewritten to improve code and reduce function calls. I have been using jQuery since more than 2 years now and it is always good to upgrade to newer version of jQuery which brings more function to help us more speed and performance. There are more than dozens of new additions for developers and it will just help all of us to do things in better way with jQuery now..!

jQuery and jQuery-UI Compatibility:

The fact is jQuery and jQueryUI are not compatible, YES they are not. I tried to upgrade my application with jQuery1.4 but UI components are failed to work. I was using jQueryUI 1.7.2, later on I digg-in on the web to see how soon UI will support jQuery1.4 but seems like 1.7.x won't do that probably 1.8.x would.  So I tried looking at what is cooking with jQueryUI 1.8 but when I downloaded alpha release of UI1.8.a1 it had jQuery1.3.2 powering it...! Read the rest of this entry »

Tags: ,

Radio-buttons with Checkbox behavior – a jQuery Plugin 1.2.5

This is almost final release to a innovative plug-in which changes the basic behavior of any Radio-button in our form and makes it selectable or un-selectable just like a checkbox.

It includes some code improvements and stays compatible to latest version of jQuery 1.3.2 just like 1.2.4. It has been tested on Safari 4.x, Internet Explorer 7.0+, Firefox 3.x and will work on Chrome 2.x or 3.x as well.

I request any users to post back any problems/bugs they encounter or enhancements they need to be included.
Read the rest of this entry »

Tags: , ,

jQuery UI – 1.7.1 is released..

The good new is that jQuery UI - 1.7.1 is out... and things are looking quite well. But still lot more to go. I am still waiting for lot of official UI widgets and Navigation or Context Menu are in that list.

jQuery is one of my favorite Javascript framework and so I am hoping for better growth of it's UI part as well.

I know discussions and planning are going on the Wiki and I know everyone will have a wishlist like I have. There are lot of options available as an plugins but having them in official UI bundle is a more better. UI Team must be working hard and there is lot of things which needs to be done.. All the best to jQuery UI team for bringing in Good for the future.

I have some complaints as well..but may be sometime later.

Tags: ,

jQuery 1.3.2 is out

It is good to see that after 1.2.6 release new iterations of version 1.3 are taking place on fast pace for jQuery. Although 1.3 release has been totally revamped with brand new selector engine inside. It is great that with every new release jQuery is coming up with better performance of selectors. jQuery 1.3.1 was bugfix release while 1.3.2 is with some nice selector performance improvements. I have not tested it yet by plugging it into any of my existing heavy-weight form application but you can check release notes here.

Firebug Lite 1.2 Released

As we all know that Firebug is a great tool for debugging and profiling our Javascript code, but we have been limited to do it with Mozilla based browsers (Firefox). Firebug team has done great job by providing us ability to use Firebug Lite with Internet Explorer, Opera or Safari.
Firebug Lite is just a small javascript library which could enable us to use most of the features of Firebug Extension without any Installation..!

Firebug Lite is subset of Firebug that could be used in IE, Opera and Safari. Firebug Lite 1.2 is packed with XHR, DOM, HTML and Javascript debugging.

You can embed Firefox Lite into any web page / application to start debugging.

To embed Firefox Lite into any page just attach following code into your page.

<script type='text/javascript'
        src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>

Or else you can download source file to your local system and can include into your pages. You can also drag-and-drop following link to your bookmark and it will enable Firebug Lite on any page.

Place Firebug Lite Bookmark

or

Go get Firebug Lite From Firebug Lite Home.

Just have a look at these screen-shots... Read the rest of this entry »

Tags: ,