$(document).ready(function(){ var static = 'a1' var cl2 = $("div."+static).clone().removeClass(static).attr('class'); alert(cl2); });