javascript - pushState is called twice and it rewrites the previous history entry -


i have click event , every time video clicked new entry pushed history. problem url changes duplicate entry entered in history , rewrites previous entry.

$(document).on('click', '.update', function(event) {     //pushstate     window.history.pushstate(data, data.title, data.video_name); }); 

when page loaded works fine when click new video problem occurs. url changes , in history pushed state. why happening?

on page load. works fine. enter image description here

after new video clicked. url changes , same entry inserted in history. enter image description here

if want check go http://beta.kida.al , click 1 of videos below.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -