私は、タグのクリックによってトリガーされる隠されたdiv要素を表示しようとしています:私がクリックしたときにここでjqueryのトグルhtmlのテキスト
<a href="#" onclick="return false;" class="viewMoreProducts">View Related Products</a>
がための私のjQueryのです:
ボタンのコードは次のようになりますボタン:私は隠されたdiv要素のトグルがうまく働いて得ることができます
// Show Hidden Product Boxes on Expand - More Products and More Link
$(".viewMoreProducts").click(function() {
$(this).parent().parent().parent().find(".moreProductsBox:first").slideToggle(300, function(){
if ($(this).parent().find(".moreProductsBox").is(":visible")){
$(this).find(":input").addClass("visibleCounter");
}
if ($(this).parent().find(".moreProductsBox").is(":hidden")){
$(this).find(":input").removeClass("visibleCounter");
}
});
});
が、私もそれは「関連製品を非表示にしている表示するには、div要素が表示されているときに変更するには、リンク上のテキストを変更したいです"と広告を表示ifferentアイコンが崩壊する。それから私がそれを崩壊させると、それはView Related Productsを読むために戻り、プラスのアイコンを持っています。
私が既に持っているjqueryに追加する方法はありますか?
これはかなりまっすぐに聞こえますが、周りに走り回っています。
おかげ
これはうまくいきました – estern