please help me
I have a script which works on First Page Load, And when i use the function of this script again is doesn’t work until i refresh the page, Means i want this script to work always, Not only when i will refresh the page, here is the script:
$(function(){
var fullEmail = $('#email').val();
console.log(fullEmail.length);
if(fullEmail.length>15)
{
textDot = fullEmail.substr(0, 14)+'...';
$('#email').val(textDot);
}
var oldText = $('#email').val();
$('#email').bind({
mouseover : function () {
$('#email').val(fullEmail);
},
mouseout: function () {
$('#email').val(oldText);
}
});
});
thanks in advance..
I have created a JSFiddle to demonstrate this. When you type in the email and then leave the input box, it shortens. When you re-enter the input box it expands back to its full length…