Notice: Undefined variable: to in /in/7Cdia on line 8
Notice: Undefined variable: from in /in/7Cdia on line 9
Notice: Undefined variable: from in /in/7Cdia on line 10
Notice: Undefined variable: to in /in/7Cdia on line 10
<script language='javascript'>
(function ($) /* Wraps this `$ = jQuery` routine. */ {
$.fn.swapWith = function (to) /* Utility extension for jQuery. */
{
return this.each(function () {
var = $(to).clone(true),
= $(this).clone(true);
$(to).replaceWith(), $(this).replaceWith();
});
};
/**/
$(document).ready(function () /* Handles email-to-username on keyup. */ {
var email = 'input#user_email',
login = 'input#user_login';
$(email).closest('p').swapWith($(login).closest('p')), $(email).keyup(function () {
$(login).val($.trim($(email).val().split(/@/)[0].replace(/[^\w]/gi, '')));
});
});
})(jQuery);
</script>
Notice: Undefined variable: to in /in/7Cdia on line 9
Notice: Undefined variable: from in /in/7Cdia on line 10
Notice: Undefined variable: from in /in/7Cdia on line 10
Notice: Undefined variable: to in /in/7Cdia on line 24
<script language='javascript'>
(function ($) /* Wraps this `$ = jQuery` routine. */ {
$.fn.swapWith = function (to) /* Utility extension for jQuery. */
{
return this.each(function () {
var = $(to).clone(true),
= $(this).clone(true);
$(to).replaceWith(), $(this).replaceWith();
});
};
/**/
$(document).ready(function () /* Handles email-to-username on keyup. */ {
var email = 'input#user_email',
login = 'input#user_login';
$(email).closest('p').swapWith($(login).closest('p')), $(email).keyup(function () {
$(login).val($.trim($(email).val().split(/@/)[0].replace(/[^\w]/gi, '')));
});
});
})(jQuery);
</script>