Trim on focus not work

http://jsfiddle.net/dLqgm0c5/

Any idea?

Thanks!

Hello!

It works :stuck_out_tongue:. The problem is that You’re missing a closing ): https://jsfiddle.net/skaparate/uz7hon5w/2/

// Your code:
$(function() {
    $("#dest").on("focus", function() {
        var dest = $(this);
        dest.val(dest.val().trim();  // Here You're missing a )
    });
});
1 Like