error_reporting(E_ALL);
ini_set('display_errors', '1');
Added 9/23/2011:
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutoria...
/* =========================================================== * Filename: * Description: * Version: * Website: * Author: * =========================================================== */
$(document).ready(function(){
$("html, body").animate({ scrollTop : 0 }, 'slow');
return false;
});
/* The following will generate a random number between 1 and 100.
var numRand = Math.floor(Math.random()*101);
if( $('#foo').is(':visible') ) {
// it's visible, do something
}
else {
// it's not visible so do something else
}
var jQueryVersion = $().jquery; console.log(jQueryVersion); // logs 1.x.x
// code to check if jquery is loaded already
/*
* ------------------------------------------------------
* First Method
* ------------------------------------------------------
*/
try{
var jQueryIsLoaded=jQuery;
jQueryIsLoaded=true;
}
catch(err){
var jQueryIsLoaded=false;
}
if(jQueryIsLoaded){
// jQuery is loaded
}
else{
// jQuery NOT loaded
}
/*
* ------------------------------------------------------
* Second Method
* ------------------------------------------------------
*/
if (typeof jQuery == 'undefined')
{
/** * Name of the Plugin (Version 1.0.0) * * Description of jQuery Plugin * * Notes: * * To-do: * * 1.0.0 - Initial Release * * @author Author Name * @copyright Copyright (c) 2011 Company Name * @link https://yoursite.com */ (function($){ $.fn.nameOfPlugin = function(opt) { /* ------------------------------------------------------ * Setup Defaut Options * ------------------------------------------------------ */ var options = $.extend(true, { }, opt); return this.each(function() {