php - Is it possible to get which tab is loading ajax page without GET? -
very easy example:
<div id="tabs"> <ul> <li><a href="tab_index.php" id="ctx-1">tab 1</a></li> <li><a href="tab_index.php" id="ctx-5">tab 2</a></li> </ul> <div class="tabs-spacer" style="height:0px"></div> </div>
and problem: i'd know tab "calls" tab_index.php.
the easiest solution be: tab_index.php?ctx=1, don't want use security reasons.
is possible @ all?
the fiddle: http://jsfiddle.net/sledgehammer/m8jya/
you bind click on tab link $('a[href="tab_index.php"]')
$(function() { $('a[href="tab_index.php"]').click(function(){ var clickedtab = $(this).attr("id")); }); });
jsfiddle example - http://jsfiddle.net/zdw37/6/
Comments
Post a Comment