PHP Classes

File: example.php

Recommend this page to a friend!
  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: 11 years 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, '.';
}