jquery, how to get the css name of the current element?

Use $("div").attr("class") to achieve this;

Refer to the following example: ?if?($(this).parent(). first().attr("class")?==?"MyName")?{ temp?=?temp+"(Normal)"; }?

alert($("#show"). attr("class").indexOf("b"));

alert($("#show2").attr("class")?==?"myCls");

alert($("div:eq(0)").attr("class")?==?"myCls");?