jQueryで属性値を比較することはできますか?
例
if( $(this).[ attribute value ] == "0")
{}
else
{}
メソッドを使用attrして属性値を取得できます。
if ($(this).attr("myAttr") == "0") {
    // "myAttr" value is "0"
} else {
    // "myAttr" value is not "0"
}
if($(this).attr("yourAttribute") == "0"){
    //do something
}
これを試して
if( $(this).attr('myattribute') == "0")    
{
   //Your statements
}    
else    
{
   //Your statements
}
メソッドを使用して属性値を取得し、attr比較できます。
if ($(this).attr("attrname") == "0") {
  $(this).css('background', 'red');
}
セレクターを使用して、特定の属性値を持つ要素を除外することもできます。
$(this).filter('[attrname=0]').css('background', 'red');