mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 04:39:55 +09:00
Make masked fields
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9074 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4a2b404c46
commit
bf4e418be6
2 changed files with 27 additions and 1 deletions
|
|
@ -99,6 +99,8 @@ jQuery(function($){
|
|||
// pagination
|
||||
$.fn.xePagination = function(){
|
||||
this
|
||||
.not('.xe-pagination')
|
||||
.addClass('xe-pagination')
|
||||
.find('span.tgContent').css('whiteSpace', 'nowrap').end()
|
||||
.find('a.tgAnchor')
|
||||
.each(function(idx){
|
||||
|
|
@ -151,6 +153,30 @@ jQuery(function($){
|
|||
// Display all sections then hide this button
|
||||
$(this).hide().parent().prevAll('.section').show();
|
||||
});
|
||||
|
||||
$.fn.xeMask = function(){
|
||||
this
|
||||
.each(function(){
|
||||
var $this = $(this), text = $this.text();
|
||||
var reg_mail = /^([\w\-\.]+?)@(([\w-]+\.)+[a-z]{2,})$/ig;
|
||||
$this.data('originalText', text);
|
||||
|
||||
if(reg_mail.test(text)) {
|
||||
$this.data('maskedText', RegExp.$1+'...');
|
||||
}
|
||||
|
||||
$this.text( $this.data('maskedText') );
|
||||
})
|
||||
.mouseover(function(){
|
||||
$(this).text( $(this).data('originalText') );
|
||||
})
|
||||
.mouseout(function(){
|
||||
$(this).text( $(this).data('maskedText') );
|
||||
})
|
||||
.focus(function(){ $(this).mouseover(); })
|
||||
.blur(function(){ $(this).mouseout(); });
|
||||
};
|
||||
$('.masked').xeMask();
|
||||
});
|
||||
|
||||
// Modal Window
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue