E
E
Evgeny Mikhailov2015-10-08 16:40:34
JavaScript
Evgeny Mikhailov, 2015-10-08 16:40:34

How to display specific divs for specific keywords?

There is a site page if the body from <body> to < / body> contains one of the keywords for example "Sale", then show <div class="rasprodja">something here< / div>, if the word is "Discounts", then show <div class="skidki">something here< / div>, etc.
And if the script finds both "Discounts" and "Sale", then respectively <div class="rasprodja">something here< / div> and <div class="skidki">something here< / div>.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Petrov, 2015-10-08
@derealty

isotope.metafizzy.co is a ready-made solution, many people use it

I
Ivanq, 2015-10-08
@Ivanq

What's the problem? You drag the page with AJAX, look for the words .indexOf() or .search(), if any, add a div.
PS By the way, your question is duplicated

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question