0

I have a page with 3 jquery ui tabs. Now when I'm redirecting from a specific controller method within laravel I want to redirect back to my page containing the ui tabs and return to the second ui tab instead of the default first one.

$(function() {
    $("#tabs").tabs({ active: 1 });
});

This is the way I set it to the second tab in a static manner, this loads on every page. Now how can I redirect to a route with 1 as my javascript variable?

1 Answer 1

1

Perhaps you can use the Session laravel method. Then you can set active: {{ Session::get('tab_index') }}, for example. Only works for blade templates (templateName.blade.php)

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for reminding me of this. Redirecting to my routes with tab index values now. And setting them on my masterpage with: var tab_index = "<?php echo Session::get('tab_index'); ?>"; Work perfectly now. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.