23 lines
632 B
JavaScript
23 lines
632 B
JavaScript
|
$(document).ready(function(){
|
||
|
|
||
|
$('.tiptxt').each(function(){
|
||
|
//Si element existe alors on a le texte
|
||
|
var texte = $(this).find('span').html();
|
||
|
if (texte!=''){
|
||
|
$(this).qtip( {
|
||
|
content: { text: texte, },
|
||
|
solo: true,
|
||
|
style: { width: 500, name: 'cream' },
|
||
|
position: { corner: { target: 'bottomMiddle', tooltip: 'topMiddle' } }
|
||
|
});
|
||
|
} else {
|
||
|
$(this).qtip( {
|
||
|
content: { text: 'Chargement...', url: $(this).find('a').attr('href')+'&q=ajax', },
|
||
|
solo: true,
|
||
|
style: { width: 500, name: 'cream' },
|
||
|
position: { corner: { target: 'bottomMiddle', tooltip: 'topMiddle' } }
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|