0

Is it possible to link directly to a tab for a site such as http://www.antutu.com/Ranking.shtml?

I'm referring to the tabs Recommend, Highest, Lowest........

Looking at the source, I couldn't find any references of class and id in a script from the block:

<div class="tab">
<div class="tab_bg" id="mobile-tab">
<div class="fl tab_i"><a href="javascript:;"onclick="loadRanking_order(this,'mobile','df');">Recommend</a></div>
<div class="fl tab_i2"><a href="javascript:;" onclick="loadRanking_order(this,'mobile','hs');">Highest</a></div>
<div class="fl tab_i2"><a href="javascript:;" onclick="loadRanking_order(this,'mobile','ls');">Lowest</a></div>
<div class="fl tab_i2"><a href="javascript:;" onclick="loadRanking_order(this,'mobile','bv');">Cost-effective</a></div>
<div class="fl tab_i2"><a href="javascript:;" onclick="loadRanking_order(this,'mobile','be');">Experience</a></div>
<div class="fl tab_i2"><a href="javascript:;" onclick="loadRanking_order(this,'mobile','bp');">Hottest</a></div>
<div class="fl tab_i2"><a href="javascript:;" onclick="loadRanking_order(this,'mobile','bc');">Camera</a></div>
<div class="fl tab_i2"><a href="javascript:;" onclick="loadRanking_order(this,'mobile','up');">Professional</a></div>
<div class="cl"></div>
</div>
</div>

Oh and I'm really new to html and javascript, but I was using this site: http://www.dnnstuff.com/modules/aggregator-tabbed-modules/aggregator-demos/linking-directly-to-a-tab.aspx 's code as a guide.

House3272
  • 1,007
  • 5
  • 14
  • 29
  • 1
    you might be able to if you loaded it in an iframe and used javascript to move to the elemtn – Daniel Powell Feb 17 '13 at 01:31
  • Not sure if this is helpful, but you can retrieve results from some of the tabs by requesting them directly, e.g. http://www.antutu.com/Ranking.shtml?cmd=ajax_mobile&o=be – Xymostech Feb 17 '13 at 01:41

1 Answers1

0

Using an actual link to the page it wouldnt appear so.

The page runs this code when clicking on a tab

function loadRanking_order(obj, m, o) {
    $("div#" + m + "-tab div.tab_i,div#" + m + "-tab div.tab_i2").removeClass("tab_i").addClass("tab_i2");
    obj.parentNode.className = "fl tab_i"
    if (o == 'df') {
        $('#rank_' + m + '_lists').html($('#rank_' + m + '_default').html());
        return;
    }
    $.ajax({
        url: '/Ranking.shtml?cmd=ajax_' + m + '&o=' + o,
        dataType: "html",
        success: function (data) {
            $('#rank_' + m + '_lists').html(data);
        }
    });
}

You could perhaps load the page in an iframe and call the javascript method yourself

Daniel Powell
  • 8,143
  • 11
  • 61
  • 108