Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature wish: notification when user clicked a link with the same hash value #25

Open
avodonosov opened this issue Nov 2, 2010 · 4 comments

Comments

@avodonosov
Copy link

Use case:

I have a man menu, every menu item is a link with different has value ( #info, #settings, #admin, etc.). When user click menu item, $.address.externalChange handler builds corresponding view with ajax.

Suppose user clicked #admin and he is presented administration page where he can navigate deeper to admin sub-views (the admin sub-views are created with ajax). The point is that when he navigates a sub-view, the browser address string doesn't not change.

Then I would like user to be able to click #admin menu item, to "return" from the sub-view, i.e. to see original admin view.

To implement this it would be good to have $.address.extenralChange callback to be invoked. Currently it is not invoked because the browser address string is #admin, and the menu item he clicked has the same href - #admin.

@theartoflogic
Copy link

This is a showstopper for me too. I would like to at least have the option to choose whether I should reload the page or not when clicking the same link.

Can you make it call the change() handler no matter if the user clicks the same link or not? Then we can check if it's the same URL and choose ourselves what we want to do with it.

@joksnet
Copy link

joksnet commented Jul 6, 2011

And this prevent the $.address.value($.address.value()); for realoding a page.

@joksnet
Copy link

joksnet commented Jul 26, 2011

--- a/src/jquery.address.js
+++ b/src/jquery.address.js
@@ -472,9 +472,6 @@
                     if (value == '/') {
                         value = '';
                     }
-                    if (_value == value && !_updating) {
-                        return;
-                    }
                     _justset = TRUE;
                     _value = value;
                     if (_opts.autoUpdate || _updating) {

Someone could explain me why this lines are necessary ? I'm using a this plugin without this lines, to enable reload a page.

@wnr
Copy link

wnr commented Aug 12, 2013

I would also love to hear this. @asual, could you shed some light on this 3 years old issue please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants