jQuery CSS plugin that returns computed style of element to pseudo clone that element?

jQuery.fn.css2 = jQuery.fn.css;
jQuery.fn.css = function() {
    if (arguments.length) return jQuery.fn.css2.apply(this, arguments);
    var attr = ['font-family','font-size','font-weight','font-style','color',
        'text-transform','text-decoration','letter-spacing','word-spacing',
        'line-height','text-align','vertical-align','direction','background-color',
        'background-image','background-repeat','background-position',
        'background-attachment','opacity','width','height','top','right','bottom',
        'left','margin-top','margin-right','margin-bottom','margin-left',
        'padding-top','padding-right','padding-bottom','padding-left',
        'border-top-width','border-right-width','border-bottom-width',
        'border-left-width','border-top-color','border-right-color',
        'border-bottom-color','border-left-color','border-top-style',
        'border-right-style','border-bottom-style','border-left-style','position',
        'display','visibility','z-index','overflow-x','overflow-y','white-space',
        'clip','float','clear','cursor','list-style-image','list-style-position',
        'list-style-type','marker-offset'];
    var len = attr.length, obj = {};
    for (var i = 0; i < len; i++) 
        obj[attr[i]] = jQuery.fn.css2.call(this, attr[i]);
    return obj;
}

jQuery.fn.css2 = jQuery.fn.css;
jQuery.fn.css = function() {
    if (arguments.length) return jQuery.fn.css2.apply(this, arguments);
    var attr = ['font-family','font-size','font-weight','font-style','color',
        'text-transform','text-decoration','letter-spacing','word-spacing',
        'line-height','text-align','vertical-align','direction','background-color',
        'background-image','background-repeat','background-position',
        'background-attachment','opacity','width','height','top','right','bottom',
        'left','margin-top','margin-right','margin-bottom','margin-left',
        'padding-top','padding-right','padding-bottom','padding-left',
        'border-top-width','border-right-width','border-bottom-width',
        'border-left-width','border-top-color','border-right-color',
        'border-bottom-color','border-left-color','border-top-style',
        'border-right-style','border-bottom-style','border-left-style','position',
        'display','visibility','z-index','overflow-x','overflow-y','white-space',
        'clip','float','clear','cursor','list-style-image','list-style-position',
        'list-style-type','marker-offset'];
    var len = attr.length, obj = {};
    for (var i = 0; i < len; i++) 
        obj[attr[i]] = jQuery.fn.css2.call(this, attr[i]);
    return obj;
}
Advertisements

22 comments on “jQuery CSS plugin that returns computed style of element to pseudo clone that element?

  1. There are some attention-grabbing points in time on this article however I don’t know if I see all of them middle to heart. There is some validity but I will take maintain opinion till I look into it further. Good article , thanks and we would like more! Added to FeedBurner as well

  2. I have discovered some significant things through your blog post post. One other point I would like to convey is that there are various games that you can buy which are designed in particular for toddler age small children. They contain pattern acceptance, colors, animals, and styles. These normally focus on familiarization as an alternative to memorization. This will keep children occupied without feeling like they are studying. Thanks

  3. hey there and thank you in your info – I’ve certainly picked up something new from right here. I did however expertise several technical points the use of this website, since I experienced to reload the web site a lot of instances prior to I may get it to load properly. I were puzzling over if your hosting is OK? No longer that I’m complaining, but sluggish loading cases instances will often have an effect on your placement in google and could damage your high quality rating if advertising and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I am including this RSS to my email and can glance out for a lot more of your respective fascinating content. Make sure you replace this once more very soon..

  4. hey there and thank you for your info – I have certainly picked up something new from proper here. I did on the other hand expertise several technical points the use of this site, as I experienced to reload the website lots of occasions prior to I could get it to load properly. I were wondering if your web host is OK? Not that I am complaining, however sluggish loading instances instances will very frequently impact your placement in google and could harm your quality score if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I am including this RSS to my e-mail and could glance out for much extra of your respective interesting content. Make sure you replace this once more soon..

  5. Hello there, simply was alert to your weblog thru Google, and located that it is truly informative. I’m gonna be careful for brussels. I’ll appreciate when you proceed this in future. Lots of people can be benefited out of your writing. Cheers!

  6. I have been exploring for a little for any high quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this website. Reading this info So i am happy to convey that I have an incredibly good uncanny feeling I discovered exactly what I needed. I most certainly will make sure to don’t forget this website and give it a glance regularly.

  7. מידע upon משחקי מחשב , פלייסטיישן 2 , פלייסטיישן 3 וצעצועי ילדים אחרים אפשר למצוא באתרי מכירות שונים בארץ.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s