template structure for tabbed modal |
I'm starting to tie my brain in knots with this one so thought I would ask here.
I need a modal dialog with tabs for 'comments', 'favourites' and 'sharing'. All will have dynamic, AJAX updatable content within them. I'm using jquery-modal, have MVC set up separately for comments, favourites & sharing, and can get them to AJAX load in separate modals just fine. What I can't work out is how to trigger the modal to open a specific tab when clicking on 'comments', 'share' or 'favourites' on the page and the load the content from 3 different controllers with their associated views. Actually thinking about this now, maybe I need a modal controller instead of the separate controllers which loads the three models and manages everything from there? Does that make sense?
don't know if i understand you correctly but try to create a javascript object something like:
Code: (function (app, $, undefined) { with this version you are able to attach events to your tabs and on the serverside you need one controller which handles your tab views a modal controller sounds fine
if i read right you are looking for something like this:
http://jsfiddle.net/elektronikLexikon/PGRhc/
"I reject your reality and substitute my own" - Adam Savage, M5 Inc.
|
Welcome Guest, Not a member yet? Register Sign In |