A
A
ayurganov2010-11-20 17:41:24
JavaScript
ayurganov, 2010-11-20 17:41:24

[jQuery] URL changed on click of link?

Good afternoon.
Please tell me how to implement the following:

There are some links on the page. By clicking on them, one of the GET parameters should change and the page should be updated.

The problem is that the link id must be a GET parameter.

Now I have done this:

_PARAMETER_

jQuery('.groups').click(function() {
window.location = jQuery.query.set("group", _PARAMETER_);
});

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nodge, 2010-11-20
@ayurganov

If I understand you correctly, then the GET parameter on click can be changed like this:

S
shsmad, 2010-11-20
@shsmad

Problem in getting id during click?

jQuery('.groups').click(function() {
    var id = $(this).attr('id')
    window.location.href = /* нужные вам действия с id */
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question