Skip to content
Snippets Groups Projects
Commit db322eb9 authored by quido.zientek's avatar quido.zientek
Browse files

[FIX] model

parent 1f2419c9
Branches
No related tags found
3 merge requests!607Pirati.cz,!593Feature/5 ajax content na homepage,!575Feature/pirati cz
Pipeline #9486 passed
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
onclick="showMoreTweets(this)" onclick="showMoreTweets(this)"
href="#" href="#"
data-url="{{ page_url }}?page=" data-url="{{ page_url }}?page="
data-page="{{ tweet_list.next_page_number }}" data-page="2"
class="btn btn__slide__wrap"> class="btn btn__slide__wrap">
<span class="btn text-sm bg-black text-white w-32 lg:text-base"> <span class="btn text-sm bg-black text-white w-32 lg:text-base">
Zobrazit další Zobrazit další
...@@ -39,7 +39,9 @@ ...@@ -39,7 +39,9 @@
tweetsList.innerHTML += data.html; tweetsList.innerHTML += data.html;
if (tweet.getAttribute('data-page') === data.last_page) if (tweet.getAttribute('data-page') === data.last_page)
btn.hide(); btn.hide();
let dataPage = tweet.getAttribute('data-page') + 1 console.log(tweet.getAttribute('data-page'))
let dataPage = parseInt(tweet.getAttribute('data-page')) + 1
console.log(dataPage)
tweet.setAttribute('data-page', dataPage) tweet.setAttribute('data-page', dataPage)
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment