Help to rewrite jquery code

Is it possible to rewrite the code so that the links did not work only when you press the button ?

$('ul.tabs li:first').addClass("active").show();
$('ul.tabs li').click(function () {
    $('ul.tabs li').removeClass("active");
    var activeTab = $(this).find("a").attr("href");
    $(activeTab).fadeIn(200, function (event) {
        $(this).load($(this).attr("id") + ".php?" + Math.random());
    return false;

Here is Example

I need it work like if Some one will go to (it will open and show them information + active tab1 button)

Now it work only by Click Button tab.


The best way to achieve this perhaps is to use .htaccess on the server silently rewrite tab1 instead to a querystring such as ?tab=1 which would look something like this:

RewriteEngine On
RewriteRule ^tab\d+$ ?tab=$1

The good people in the Server Config forum can help you out with achieving that, after which we can revisit the JavaScript side of things.

Thanks for replay, but my problem was in JS. I correct my problem by myself, the problem that i don’t use window.location.hash; . now work ))) But thank any way … )))

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.