How to change css of an item by its content

Hi @erezvol, so the value of your wanted variable will contain a string such as 12345, so you’re not likely to find() anything unless the user happens to enter a valid CSS selector here; and if you do find an element, it won’t have a this property (you might also want to check the console for errors BTW).

What you might do though is filter() your input elements, which allows passing a function for more involved checks:

var wanted = $('#search_ticket').val()

$('input').filter(function () {
  return this.value === wanted
}).parent().css({ background: 'yellow' })