Displaying posts categorized under

RJSLIB

Ram JavaScript Library

isFn

Definition function isFn(fn) { if(isNull(fn) || fn==undefined) { return false; } return (typeof (fn) == ‘function’); } Example Example Source <style> #test { text-align:left; } #test2 { text-align:left; } </style> <div id=’test’></div> <div id=’test2′></div> <script> El(‘#test’).html(isFn(‘rama’)); El(‘#test2′).html(isFn(isStr)); </script>

WaterMark

Water Mark Text Example Name : Father Name : Focused Class Example Type Here To Search :

isNull

Definition function isNull(fn) { return (fn == null); } Example Example Source <style> #test { text-align:left; } #test2 { text-align:left; } </style> <div id=’test’></div> <div id=’test2′></div> <script> var a = ‘rama’; var b; //should be null El(‘#test’).html(isNull(a)); El(‘#test2′).html(isNull(b)); </script>

Image Fader

You Can Have as Many Images Faders as You Need in Same Page like these A fine Example is a Good Counter

styleEl

Definition function styleEl(el, stylset) { for (x in stylset) { el.style[x] = stylset[x]; } return el; } Example click on the button to switch color Example Source <table id="swttbl"> <tr> <td id="swt">click on the button to switch color</td> </tr> <tr> <td> <input value="colorize" onclick="colorize()" type="button" class="button" /> </td> </tr> </table> <script> function colorize() { styleEl(GEBI(‘swt’), […]

Accordion

Sorry the plugin is still under developmentCome back here later.

attrib

Definition function attrib(el, ao) { if (ao == ‘undefined’) { return; } if (isStr(ao)) { var ret = el.getAttribute(ao); if (isNull(ret)) { ret = el[ao]; } return ret; } for (prop in ao) { if (prop == ‘style’) { styleEl(el, ao[prop]); } else { el[prop] = ao[prop]; } } return el; } Example Example Source […]

CreateTable

Definition function CreateTable(rowcnt, colcnt, opts) { var table = CE(‘table’, opts['tableoptions']); var tbody = CE(‘tbody’, opts['tbodyoptions']); var tdcnt = 0; for (i = 1; i

randomColor

Definition function randomColor() { var red = Math.floor(Math.random() * 255); var green = Math.floor(Math.random() * 255); var blue = Math.floor(Math.random() * 255); return ‘rgb(‘ + red + ‘,’ + green + ‘,’ + blue + ‘)’; } Example click on the button to switch color Example Source <style> #swttbl td { padding:10px; } </style> <table […]

CE

Definition function CE(tagName, opt) { var el = document.createElement(tagName); attrib(el, opt); return el; } Example welcome to rjs, Example Source <div id="iam">welcome to rjs, </div> <script> var spn=CE(‘span’,{style:{backgroundColor:’#CCCCCC’, cursor:’pointer’}, innerHTML:"This is a dynamically created span.", onclick:function(){ alert(attrib(this,’innerHTML’)); }}); AC(spn,GEBI(‘iam’)); </script>