I have no clue what to do to fix this.
I've installed a JQuery library (http://st3ph.github.io/jquery.easyPaginate/) to help me paginate my data. I am also using Vue.js to make things easier. However, after installing the plugin, and seeing that pagination does in fact work, I noticed that my click handlers stopped working! In fact, I have some filters that also call other Javascript function to execute the filter code... but they are all not working. After inspecting the HTML code using Chrome's Developer Tools (F12)... all I can see is that the plugin is adding an 'easyPaginate easyPaginateList' class to the tags.
So... the plugin makes the <ol>
tag look like:
<ol id="cards" class="easyPaginate easyPaginateList">
Anyway,
My HTML looks like this:
<div id="BrowseCards">
<ol id="cards">
<li v-for="(card, i) in cards" v-on:click="cardDetails($event)">
<span :id="card.Id" style="display:none"></span>
<img src="card.ImageUrl"/>
<h2 name="title">{{card.Title}}</h2>
</li>
</ol>
</div>
The Javascript looks like:
<script>
methods: {
cardDetails: function (event) {
var cardId = $(event.target.parentElement)[0].firstChild.id;
window.location = 'https://' + location.host + '/Home/CardDetails/?cardId=' + cardId;
},
...
[*** other Javascript functions ***]
...
setupPagination: function () {
$('.easyPaginate').easyPaginate({
paginateElement: 'li',
elementsPerPage: 4,
effect: 'slide'
});
},
mounted: function()
{
this.setupPagination();
}
</script>
The Problem: This was working before but, now, all my scripts don't fire.
My Question for You:
1. What am I doing wrong/what am I missing?
2. And, how do I integrate a pagination plugin that does NOT break my code?
Thanks in advance.