Bir sayfada belirli bir div gösterme ve gizleme konusunda harika bir eğitici buldum. Kodun iyi çalıştığını biliyorum, ancak genişletmek isterim ki, sayfa yüklerinde show/hide hatırlanır. Ben ise gerçek kod yazma bildiği edersen .. Bir çözüm jQuery çerezi için cevap oldu baktım .. İşte akım pasajı var:Gizleme/gösterme öğesini hatırlamak için jQuery cookie.js'yi kullanma?
<script type="text/javascript">
jQuery(document).ready(function() {
// hides the group_desciption as soon as the DOM is ready
// (a little sooner than page load)
jQuery('#group_desciption').hide();
// shows the group_desciption on clicking the noted link
jQuery('a#slick-show').click(function() {
jQuery('#group_desciption').show('slow');
return false;
});
// hides the group_desciption on clicking the noted link
jQuery('a#slick-hide').click(function() {
jQuery('#group_desciption').hide('fast');
return false;
});
// toggles the group_desciption on clicking the noted link
jQuery('a#slick-toggle').click(function() {
jQuery('#group_desciption').toggle(400);
return false;
});
});</script>
Ben çerez eklemek nasıl herhangi bir fikir Kullanıcıdan seçimi hatırlıyor musunuz? Ben hala oldukça kolay olmalı genel olarak jQuery/Javascript :) önceden
Teşekkür :)
Teşekkür !! Bazı yardım ve karışıklık ile bu mükemmel çalışmak için var! –