R
R
Ruslan Makarov2017-12-04 20:52:22
JavaScript
Ruslan Makarov, 2017-12-04 20:52:22

What is the quote slider (rotator) from the example implemented on?

Good!
Please tell me what the quote slider is implemented on (a rotator that updates the quote when updating / moving to another page or by clicking like on the tproger ru website), thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-12-04
@webinar

Js or jquery sends an ajax request to the server, specifically for tproger ru the request flies here (even without crfs tokena, good people):
https://tproger.ru/wp-content/plugins/citation-wid...
as you can see, the server returns random quote as text Js or jquery updates the desired block

$('.someBtn').on('click',function(){
  $('#myTextWrap').load('https://tproger.ru/wp-content/plugins/citation-widget/getQuotes.php?_=1512410356815');
});

and all.
Although I would give json with the quote id to write it to localStorage or sessionStorage. Then you can send a post with these id-shniks and not repeat quotes.
Well, on the database server, and the selection of a random record from the table. Everything is quite simple there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question