Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Radovan Janjic  >  PHP jQuery updater  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP jQuery updater
Check and update newer jQuery versions
Author: By
Last change:
Date: 1 year ago
Size: 358 bytes
 

Contents

Class file image Download
<?php

include 'jquery_updater.class.php';

$jQu = new jquery_updater;

$jQu->setJqueryPath('jquery.js');

if(
$jQu->thereIsNewer()){
    
$jQu->update();
    echo 
'You\'ve used version: '$jQu->localVersion'.<br>Version was updated to: '$jQu->lastestVersion'.';
}else{
    echo 
'Currently using the latest version: '$jQu->localVersion'.';
}