Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Du JS :
- // notebox:
- // -------
- // quand on survole un appel de note, ajouter la class 'notebox'
- // sur la note concernee ; la css la fera flotter en bas
- // in_spip_note indique si la souris est sur les notes
- // (pour eviter un clignotement)
- var in_spip_note = false;
- $('a.spip_note[rel=footnote]')
- .hover(
- function() {
- var idnote = $(this).attr('href').replace(/^.*#/,'#');
- $(idnote).addClass('notebox');
- },
- function(){
- setTimeout(function() {
- if (!in_spip_note) $('.notebox').removeClass('notebox');
- }, 50);
- }
- ).click(function(){
- $('.notebox').removeClass('notebox');
- });
- $('.spip_note[rev=footnote]').parent()
- .hover(
- function() {
- in_spip_note = true;
- },
- function(){
- in_spip_note = false;
- $('.notebox').removeClass('notebox');
- }
- );
- + une def CSS :
- .notebox {
- position:fixed;
- bottom:0;
- background: #ffffff;
- border-top: 4px double #333;
- padding: 10px 0 40px 0;
- margin:0;
- z-index: 30;
- width: 540px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement