Subversion Repositories eFlore/Applications.coel-consultation

Rev

Rev 93 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 93 Rev 269
1
/*Courriel() est basé sur les sources suivantes :
1
/*Courriel() est basé sur les sources suivantes :
2
	http://www.html-advisor.com/javascript/hide-email-with-javascript-jquery/
2
	http://www.html-advisor.com/javascript/hide-email-with-javascript-jquery/
3
	http://plugins.jquery.com/files/jquery.mailme.js.txt
3
	http://plugins.jquery.com/files/jquery.mailme.js.txt
4
*/
4
*/
5
jQuery.fn.courriel = function() {
5
jQuery.fn.courriel = function() {
6
    var at = / \[arrobase\] /;
6
    var at = / \[arrobase\] /;
7
    var dot = / \[point\] /g;
7
    var dot = / \[point\] /g;
8
    this.each( function() {
8
    this.each( function() {
9
        var addr = jQuery(this).text().replace(at,"@").replace(dot,".");
9
        var addr = jQuery(this).text().replace(at,"@").replace(dot,".");
10
        var title = jQuery(this).attr('title')
10
        var title = jQuery(this).attr('title')
11
        $(this)
11
        jq(this)
12
            .after('<a href="mailto:'+addr+'" title="'+title+'">'+ addr +'<\/a>')
12
            .after('<a href="mailto:'+addr+'" title="'+title+'">'+ addr +'<\/a>')
13
            .remove();
13
            .remove();
14
    });
14
    });
15
};
15
};