Opened 11 years ago
Closed 11 years ago
#12056 closed bug (invalid)
Insert space before capital letters in jquery template using replace and regex. if $ is there it is not working
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
the below jquery template is not working because f $1
<script id="" type="text/x-jquery-tmpl">
<table>
<tr>
{{each(i, enityCol) WorkColumnNames}}
<th class="SortList">
${String(enityCol).replace(/([A-Z])/g, ' $1')}
</th>
{{/each}}
</tr>
</table>
</script> if i replace $1 by 111 or some word it is working
<script id="" type="text/x-jquery-tmpl">
<table>
<tr>
{{each(i, enityCol) WorkColumnNames}}
<th class="SortList">
${String(enityCol).replace(/([A-Z])/g, ' 111')}
</th>
{{/each}}
</tr>
</table>
</script>
Note: See
TracTickets for help on using
tickets.
jquery.template is not managed on this bug tracker and is not supported by the jQuery team; you might try StackOverflow.