Bir zincir .show() gibi bir şey yaptığınızda ne olduğunu anlamıyorum. Ne de bu kodu yazdım ya da burada neler olduğunu anlamaya nasıl bir fikrim var. Dolayısıyla bu soru.show(). Parent(). Show() - Burada neler oluyor?
// Remove favorite category
$(".FavoriteRemove").click(function() {
var cat = $(this).parents(".Category"); //the parent of the clicked item is the category/bundle
var catid = $(this).attr("catid"); //the id tag on the clicked item is the BundleID
$.post($(this).attr("href"), function() { //the href tag is the post URL for adding a favorite
cat.remove(); //here we remove the category/bundle
//*** WHAT IS THIS DOING? v
$(".Category[catid=" + catid + "]").show().parent().show();
//*** NO THAT UP THERE^
if ($(".FavoriteCategories div").length == 0)
$(".FavoriteCategories").hide();
//bindCategories();
});
return false;
});
Birisi bunun ne anlama geldiğini açıklayabilir mi? Hedefin, ID ile eşleşen bir öznitelik 'Kategori' sınıfı olduğunun farkındayım, ancak işlev zincirinin ne anlama geldiğini anlamıyorum.
Teşekkürler.
+1; Sanırım buradaki karışıklığın kaynağı bu. –
+1 akıcı arayüz – RichardTheKiwi
Çok güzel bir açıklama. Benimkinden çok daha iyi.+1 – user113716