javascript - jquery back button to previous category in sortable gallery -


i have jquery portfolio gallery 4 categories sortable. when click on category portfolio rearranged on same page through jquery showing project in category. upon clicking specific project user can see project page/details. want add button on page when user viweing project can return category @ before.

i tired following creates button take me main portfolio page, not category browsing before.

function goback() { window.history.back(); } 

this 1 of gallery page in case: http://goo.gl/jesnjd

not knowing of application's code, bit of shot in dark think know you're missing.

using history.back() take last page visited (a page visit recorded if url updated). if updating content in website jquery , not loading new page, browser's history doesn't record takes top page still.

what need change button code hide current project, , redisplay category page. cannot use history.back().

edit: if need more data correctly rebuild previous page, can either change url category page (not simple implement perhaps robust thing do), or store information page came from. if using cookies, save navigation there, add ref value query string when navigate project page.

category page:

<a href="/home/projectname?ref=categoryname">link project</a> 

project page:

<a href="/home?category=categoryname">back button</a> 

then use information reopen or resort categories.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -