menu

Wednesday, 3 July 2013

script.aculo.us provides you with easy-to-use, cross-browser user interface JavaScript libraries

script.aculo.us provides you with easy-to-use, cross-browser user
interface JavaScript libraries to make your web sites
and web applications fly.

What's inside? animation framework,
drag and drop, Ajax controls
DOM utilities, and unit testing.

It's an add-on to the
fantastic Prototype
framework.   READ MORE

Saturday, 29 June 2013

Get date picker free calendar jquery

Description

Calendars Preview
Tigra Calendar is a free cross-browser JavaScript Calendar control, it improves the user experience by enabling a drop-down calendar for date fields in web forms.

Features

LIVEDEMO
  • Easy to use – no programming skills required
  • Small footprint – no need to add large JavaScript framework if all you need is date picker
  • Easy customization and styling via CSS
  • Simple localization
  • Attaches to existing form fields, plays nicely with existing styling
  • Can be attached dynamically – perfect for AJAX applications
  • Supports any date format similar to PHP’s date(..) function
  • Efficient, well formatted code full of code snippets to borrow – great learning source
  • Works in all modern browsers including mobile platforms
  • Can be used in any kind of web applications (PHP/ASP/CGI etc.)
  • Public domain software – FREE to use any way you want

Benefits

Download Now!
  • Fast and simple date entry improves user experience
  • Use of the calendar eliminates date formatting errors
  • Invalid dates such as February 30 can not be entered via the calendar

Setup

  1. Upload calendar files to your website
  2. Link calendar resources (JS and CSS) to your pages
  3. Add class=”tcal” to text input(s)

Thursday, 27 June 2013

How I chenged checkbox bg color on when it is checked?

Your are not setting the color on the label but on the checkbox. jQuery makes it easy for you to select / traverse DOM elements (and also helps clean-up a lot of unnecessary IDs), see this fiddle :
$('input[type=checkbox]').change(function(){
    if($(this).prop('checked')){   
        $(this).parent().css('backgroundColor', '#bff0a1');
    }else{
        $(this).parent().css('backgroundColor', '#eee');        
    }
});
Live Example

Wednesday, 26 June 2013

Auto Load More Data On Page Scroll jQuery PHP

Database records automatically when user scrolls down to the bottom of the page? The technique can be seen in Twitter, Facebook and several other websites. Let’s use examples from previous article, with some modification we can create Ajax based auto loading script, which loads records when user scrolls to bottom of the page.
Read More  auto-load-records-on-scroll

Wednesday, 24 April 2013

aciTree is a customizable cross-browser treeview control with jQuery

aciTree is a customizable cross-browser treeview control written as a jQuery plugin (requires at least v1.7.1). It offers a API for controlling things down to the element level and it has built-in functionality to load the entire tree with AJAX.

Features

  • supports an unlimited number of 'file' items (items that have no childrens) and 'folder' items (items that can have one or more childrens);
  • unlimited number of levels, those can be easily loaded with AJAX (the archive contains a small PHP implementation as an example);
  • supports selecting an item, checkbox and radio-button elements, keyboard navigation (the arrow keys, pageup/pagedown, home/end, enter, escape and space can be used), in-place item editing (using f2 key or the mouse and enter/escape keys to save/cancel editing);
  • is possible to change the form in which the tree is displayed with CSS, the items allows HTML formatting, the odd/even rows can be styled differently;
  • supports displaying multiple columns without using tables, with RTL support;
  • you can specify an ICON image for each item (background-position-x and background-position-y can be included so that you can use a single image containing all the icons);
  • aciTree provides an easy to use API for handling the tree structure: initialization data read with AJAX or init from a JavaScript variable, adding, removing items, changing ICON images etc;
  • by the use of a callback function you can customize the content of each item before it's even inserted in the DOM.
Read More
Demo
 

Tuesday, 16 April 2013

Play Notification Sound using Jquery.

I received lots tutorial requests from my readers that asked to me, how to play a notification sound on website chat?. We implemented this in a simple chat box application using Jquery and HTML5 audio tag, it is just five lines of code. Use Modernizer library for Internet Explorer HTML5 support, please turn on the volume and try this live demo.
Read More

Monday, 8 April 2013

How to Make Pagination in PHP

I am trying to solve problem of pagination in PHP. I have decided to give you a very easy pagination code
You can make pagination of static records and database records.
<?php
/**
*$num_rows =  First make a query to get the number of the results
*/
$num_rows = 50;
include('paginator.class.php');
$pages = new Paginator;
 
echo'<pre/>';print_r( $pages->getPaginateData($_GET['page'],$num_rows) );
echo $pages->displayHtmlPages($_GET['page'],$num_rows);
?>

Sunday, 7 April 2013

How to Callback Cross Domain Data with Jquery & JSON

callback cross domain data with jQuery and JSON(JavaScript Object Notation) is a lightweight data-interchange format.

Just copy and paste this following code between tag. You can display phpgang data.
phpgang.json.js
Javascript code read the JSON file.
phpgang_json.php
Contains PHP code displaying results from Messages table in JSON format.
 phpgang_json.css

*{margin:0px; padding:0px;}
ol.jsonbox {
font-family:"lucida grande",tahoma,verdana,arial,sans-serif;
font-size:11px;
color:#FFFFFF;
list-style:none;
width:300px;
padding:10px 10px 25px 10px;
background:url(http://www.phpgang.com/wp-content/uploads/gang.jpg)
bottom right no-repeat;
background-color:#333333;
text-align:left
}
ol.jsonbox li { padding-bottom:4px}
ol.jsonbox li a{color:#80c8e5; text-decoration:none}
ol.jsonbox li a:hover{color:#80c8e5; text-decoration:underline}