Blumish Posted February 7, 2013 Report Share Posted February 7, 2013 Sveiki! Šis ir kods. Kad uzpiež uz "Spied te un atveras komentāri" Atveras facebook komenti ar javascript. Jautājums ir tāds kā lai blakām izveido pogu Hide? Nospiežot komentāri aizveras. Var arī tā ka kautvai 2x nospiežot uz "Spied te un atveras komentāri" komentāri aizveras. <button>Spied te un atveras komentāri</button> <p style="display: none" class="fb-comments" data-href="<?php the_permalink() ?>" data-num-posts="2" data-width="739"></p> <script> $("button").click(function () { $("p").show("slow"); }); </script> Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 7, 2013 Report Share Posted February 7, 2013 Princips ir tāds pats, tikai `show` vietā ir `hide` metode. Quote Link to comment Share on other sites More sharing options...
Blumish Posted February 8, 2013 Author Report Share Posted February 8, 2013 Princips ir tāds pats, tikai `show` vietā ir `hide` metode. es mēģīnāju jā. bet man nesaaca. prasu diezgan stulbi, bet vai nevaretu tu man iedot precizu kodu? paldies Quote Link to comment Share on other sites More sharing options...
vostro Posted February 8, 2013 Report Share Posted February 8, 2013 Izmanto jquery toggle Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 8, 2013 Report Share Posted February 8, 2013 > vai nevaretu tu man iedot precizu kodu? Nē. Quote Link to comment Share on other sites More sharing options...
aaxc Posted February 8, 2013 Report Share Posted February 8, 2013 vai nevaretu tu man iedot precizu kodu? Tev tika ieteikti varianti kā, ar to pilnībā pietiek. Ja tu nevēlies ieguldīt savu laiku lai pamācītos un izveidot kodu, tad kāpēc, lai kāds cits to darītu tavā vietā? Quote Link to comment Share on other sites More sharing options...
Kemito Posted February 8, 2013 Report Share Posted February 8, 2013 daGrevi, bezkauņa. :/ Še tev pilnais kods - http://api.jquery.com/hide/ Quote Link to comment Share on other sites More sharing options...
Blumish Posted February 8, 2013 Author Report Share Posted February 8, 2013 bet kas ir japieraksta klat lai kad otro reizi uzspiež uz "Spied te un atveras komentāri" viņi pazustu.. Visādīgi izmeģinājos Quote Link to comment Share on other sites More sharing options...
aaxc Posted February 8, 2013 Report Share Posted February 8, 2013 Izmanto jquery toggle Nu tev takš skaidri un gaiši priekšā pateica ... Quote Link to comment Share on other sites More sharing options...
Blumish Posted February 8, 2013 Author Report Share Posted February 8, 2013 viss sanāca, paldies Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.