I created this example
As you can see, I separated the image in four quadrats using the area-tag.
The first quadrat has the data-name: abc, the second quadrat has the data-name: def,
The third quadrat has the data-name: ghi, the fourth quadrat has the data-name: jkl.
Moreover, there is an input for a search. What i want you to ask, if its possible to type anything in the input and look if the input matches one of the data-name´s.
Scenario:
I type an "a" in the input => Every area with an "a" at the beginning of its data-name should stay as it is, but other area´s should get an opacity of "1". Is this possible using the keyup-event? e.g. :
$(document).ready(function () {
$("#searchfield").keyup(function() {
var input = $.("#searchfield").val();
$( "area[data-name^=' + input + ']" ).css( "opacity" , "1" );
});
});
And how to make jquery searching for the html? i know how to do ajax etc.. but make jquery searching in the source code of website?
I followed this article, but there was no result:
Need your help
greetings