0

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...

2 Answers 2

3

Your filter selector is wrong.

You're probably trying to write .filter('[id$="' + endWithId + '"]')

However, you should use a classname instead.

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.