javascript - How to add question mark parameter instead of forward slash in history js plugin -



trying change url (http://www.rangde.org/gift-cards?theme=anniversary)
but output getting (http://www.rangde.org/gift-cards/?theme=anniversary)
i dont want forward slash in front of question mark parameter pls me fix this
script here:

 history.pushstate({state:1,rand:math.random()}, 'designs', '?theme=diwali');        function(){                      var history = window.history, // note: using capital h instead of lower h                 state = history.getstate(),                 $log = $('#log');                  history.log('initial:', state.data, state.title, state.url);                  history.adapter.bind(window,'statechange',function(){ // note: using statechange instead of popstate                  var state = history.getstate(); // note: using history.getstate() instead of event.state                 history.log('statechange:', state.data, state.title, state.url);                 });              } 

not sure if bug or feature, looks adding actual url query helps:

history.pushstate({}, 'new title', window.location.pathname + "?" + ...);    

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -