RSS

Handle Cloning with jQuery Uniform

25 Nov

If you try to apply uniform styles for cloned elements, you may come across some weird situations where you don’t get the expected output. Just try this if it applies to you also.

The bold text is the most important and it should be applied in the same order.

$.uniform.restore(‘.is_variant_enabled’);
$(‘.is_variant_enabled’).uniform();

 

$.uniform.restore('.is_variant_enabled');
var row = $("#tbl_variants").find('tr:eq(1)').clone();
$("#tbl_variants tbody").prepend(row);
$('.is_variant_enabled').uniform();
Advertisements
 
Leave a comment

Posted by on November 25, 2015 in jQuery

 

Tags:

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

 
%d bloggers like this: