Opened 12 years ago
Closed 12 years ago
#8929 closed feature (wontfix)
Provide auto-trim option for .text()
Reported by: | AlistairB | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | manipulation | Version: | 1.5.2 |
Keywords: | needsreview | Cc: | |
Blocked by: | Blocking: |
Description
I am constantly writing code like this:
var myId = $.trim($(".some-element").text());
It would be nice to have a leaner way to do this. eg.
var myId = $(".some-element").text(true); var myId = $(".some-element").textTrim(); //there isprobably a better name for this
Change History (3)
comment:1 Changed 12 years ago by
Component: | unfiled → manipulation |
---|---|
Keywords: | needsreview added |
Priority: | undecided → low |
Status: | new → open |
Type: | enhancement → feature |
comment:2 Changed 12 years ago by
Note: See
TracTickets for help on using
tickets.
If you do this a lot, write a utility function.
I don't think we should add this to core.