jQuery4PHP Current Release: v1.7.0 - Stable

jQuery version: v1.8.2

jQueryUI version: Stable (1.8.24: jQuery 1.3.2+)

jQuery4php API

Ajax

Hide navigator Hide source code

The jQuery4PHP library has a full suite of AJAX capabilities. The functions and methods therein allow us to load data from the server without a browser page refresh.

GetScript

Load a JavaScript file from the server using a GET HTTP request, then execute it.
<div>
<input type="button" value="Get Script" id="btnGetScript" />
<button id="goAnimation">&raquo; Run</button>
<div class="block" style="background-color: blue; 
                          width: 150px;
                          height: 70px; margin: 10px;">
</div>
<?php
echo
YsJQuery::newInstance()
  ->onClick()
  ->in('#btnGetScript')
  ->execute(
    YsJQuery::getScript(
      'http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js',
      new YsJsFunction('
      $("#goAnimation").click(function(){
        $(".block").animate( { backgroundColor: "pink" }, 1000)
          .animate( { backgroundColor: "blue" }, 1000);
      });
      ')
    )
  )
?>
</div>

Comments

  • Support requests, bug reports, and off-topic comments will be deleted without warning.

blog comments powered by Disqus

About

Demos

jQueryUI

Plugins Support - New!

Components - New!

Project Developed by The YepSua Team
SourceForge.net