Jquery tabs, how to redirect?

darksky

New Member
Hello all you programmers, well I have one problem with jQuery tabs. I am using jQuery for navigation between tabs, and jQuery code looks like this:\[code\]$(document).ready(function() {//Default Action$(".tab-content").hide(); //Hide all content$("ul.vertical-tab li:first").addClass("active").show(); //Activate first tab$(".tab-content:first").show(); //Show first tab content//On Click Event$("ul.vertical-tab li").click(function() { $("ul.vertical-tab li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab-content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content $(activeTab).fadeIn(); //Fade in the active content return false;});});\[/code\]First tab is always default, so when I work on second tab, and submit data to external php script, redirection always returns me on the first(default tab). My redirection looks like this:header('Location:http://www.administrator.php');\[code\]$con=mysqli_connect("localhost","root","","database");$firstname=$_POST['firstname'];$lastname=$_POST['lastname'];$sql="INSERT INTO student (firstname,lastname) VALUES('$firstname','$lastname')";if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error()); }header('Location:http://www.administrator.php');mysqli_close($con); \[/code\]So because I use jQuery I can't redirect myself to desired tab using address. Help :/
 
Back
Top