Bug Tracker

Modify

Ticket #7370 (closed bug: invalid)

Opened 3 years ago

Last modified 16 months ago

IE 8 trim BUG

Reported by: xxcoderz@… Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocking: Blocked by:

Description

this code not work in ie , work fine under ff , chrome

<input type="text" value="Your Name" id="mail_list_name" class="ie8text" />


.
.
...
var name = $('#mail_list_name').val().trim();
...
..

Change History

comment:1 Changed 3 years ago by snover

  • Status changed from new to closed
  • Resolution set to invalid

Thanks for the report, but this is not a jQuery bug. Calling val with no arguments returns a string. trim happens to be a string function in JavaScript 1.8.1, which IE does not implement. The correct function in jQuery is jQuery.trim. In the future, please use the  jQuery Forum for support requests.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.