Hi, i'm trying to make this work but i can't!

I cleaned a code and fix the codestyle. I edited it to my needs, but i'm stuck when i'm trying to make links to change when the variable language is changed. Sorry my english is bad.

I'd like to make patches links (second table) to change when language is changed. When you change the region or the language, the client downloads (first table links) change to the selected language, but patches no.

Here is the code, also you can check how it works: http://wow-spain.tk/downloads.html

Stylesheets and jscripts are in /css and /jscript. But you can check it in the source view page of the explorer.

Please help me! I don't know what more to do.

Thanks!

P.D.: The page will be loaded by a framework, so i have to clean all the unnecessary code in the scripts and css stylesheet, some tip or help would be great. Also the background need to be blank, so ¿how can i do that without break the table style?

Recommended Answers

All 3 Replies

My suggestion is use the jquery to do it.
1. put the contents all together but dividing them using div with a id="language", class="hide".
2. add CSS .hide{display:none;} .show{display:block;}.
3. when language changed, jQuery('#language').addClass('show').siblings('.show').removeClass('show').

Hope this do help you.

Well, i put the patches code in a div:

<div class="hide" id="language">
    <tr class="language-pack language-pack-wow-full language-pack-wow-full-NA hidden">
        patches code here
    </tr>
    ...
</div>

But don't work... i updated it: www.wow-spain.tk/downloads.html

Can you explain it plz?

Maybe the problem is: (download.js)

        // enable the download links
        $('#' + id + ' .download a').addClass('hidden');
        $('#win-' + game + '-' + client + '-' + region + '-' + lang).removeClass('hidden');
        $('#mac-' + game + '-' + client + '-' + region + '-' + lang).removeClass('hidden');
        $('#pdf-' + game + '-' + client + '-' + region + '-' + lang).removeClass('hidden');

If this is true, why only works on the first <td class="download win"> ??
Only can be one download win class???

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.