Reputation: 532
I am trying to use a selector to filter on all input type.
var allInputTextboxes = $('input[type=text]');
var filteredList = allInputTextboxes.filter('Id$=' + endWithId);
I am not getting any result back. Is this doable?
Thanks...
Upvotes: 0
Views: 132
Reputation: 50966
try to change
var filteredList = allInputTextboxes.filter('Id$=' + endWithId);
to
var filteredList = allInputTextboxes.filter('[id$="' + endWithId+'"]');
(assuming you have id attribute)
because first one makes no sense
Upvotes: 0
Reputation: 887315
Your filter
selector is wrong.
You're probably trying to write .filter('[id$="' + endWithId + '"]')
However, you should use a classname instead.
Upvotes: 3