This jQuery plugin should calculate the textwidth of elements. jQuery.fn.textWidth = function(){ var _t = jQuery(this); var html_org = _t.html(); if(_t[0].nodeName=='INPUT'){ html_org = _t.val(); } var html_calcS = '' + html_org + ''; jQuery('body').append(html_calcS); var _lastspan = jQuery('span').last(); //console.log(_lastspan, html_calc); _lastspan.css({ 'font-size' : _t.css('font-size') ,'font-family' : _t.css('font-family') }) var width =_lastspan.width() + 5; //_t.html(html_org); _lastspan.remove();
ARCHIVE
Freebies
Posted on May 1 2013 / in Freebies
For importing in your Flash projects, you need to: 1. open sourceindex.fla 2. open the library 3. drag and drop the main movie and rotator components in your .fla 4. remember to also copy the classes razor and caurina in the folder your .fla is 5. done. preview – here download – here licence –
Hello guys, Just wrote a Twitter API Wrapper with caching Available here – https://github.com/digitalzoomstudio/twitterapiwithcache
Posted on August 21 2011 / in Freebies / 202 comments
Ok, ok.. don’t get excited: it’s not a plugin :(, it’s a core modification, but it works. Tried the plugin way but there are not many / none good resources on the internet about Vanilla Addons, so would have taken me much more if it was even possible. Enough talk: Download and install latest vanilla
Posted on July 22 2011 / in Freebies / 3 comments
So nearly a year ago we launched Flipbook – jQuery powered. For those who have not seen it – Many of you liked the demo page – so I figured it does not hurt to give the psds to the public. First one: download
Posted on March 14 2011 / in Freebies
Preview: Download: here This is a skin for this – http://bit.ly/dOr8sp
Posted on November 25 2010 / in Freebies / 3 comments
function readXML($arg, $type) { $i=0; $xml = simplexml_load_file($arg); if($type=='main'){ foreach($xml->children() as $child) { if($child->getName()=="item"){ echo "<h3>" . $child->title . "</h3>"; if($i==0) readXML('http://localhost/wordpress/?mode=xml&xmlfile=rotator.php&page=1', 'images'); $i++; } } } if($type=='images'){ $aux = ''; foreach($xml->children() as $child) { if($child->getName()=="item") { $aux = $aux . ''; } } $aux = $aux . ''; echo $aux; } } readXML("http://localhost/wordpress/?mode=xml", "main");
Recent Comments