Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2013
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Du JS :
  2.  
  3. // notebox:
  4. // -------
  5. // quand on survole un appel de note, ajouter la class 'notebox'
  6. // sur la note concernee ; la css la fera flotter en bas
  7. // in_spip_note indique si la souris est sur les notes
  8. // (pour eviter un clignotement)
  9. var in_spip_note = false;
  10. $('a.spip_note[rel=footnote]')
  11. .hover(
  12. function() {
  13. var idnote = $(this).attr('href').replace(/^.*#/,'#');
  14. $(idnote).addClass('notebox');
  15. },
  16. function(){
  17. setTimeout(function() {
  18. if (!in_spip_note) $('.notebox').removeClass('notebox');
  19. }, 50);
  20. }
  21. ).click(function(){
  22. $('.notebox').removeClass('notebox');
  23. });
  24. $('.spip_note[rev=footnote]').parent()
  25. .hover(
  26. function() {
  27. in_spip_note = true;
  28. },
  29. function(){
  30. in_spip_note = false;
  31. $('.notebox').removeClass('notebox');
  32. }
  33. );
  34.  
  35. + une def CSS :
  36.  
  37. .notebox {
  38. position:fixed;
  39. bottom:0;
  40. background: #ffffff;
  41. border-top: 4px double #333;
  42. padding: 10px 0 40px 0;
  43. margin:0;
  44. z-index: 30;
  45. width: 540px;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement