Dashboard Tabs Development
Permalink
1 user found helpful
August 03, 2011 at 12:26 AM
I was struggling with inserting Tabs on a page in the Dashboard. Had JQuery ones working however another developer on the site had conflicts. So, the solution was to workout how the C5 Tabs are utilised.
Here is what I used :)
< div>
< ul id= "transaction_tabs" class = "ccm-dialog-tabs" >
< li class = "ccm-nav-active" >< a href= "javascript:void(0);" id= "tabs-1" > New</ a></ li>
< li>< a href= "javascript:void(0);" id= "tabs-2" > Renewals</ a></ li>
< li>< a href= "javascript:void(0);" id= "tabs-3" > Updated</ a></ li>
</ ul>
< div id= "tabs-1-tab" ><!-- your content 1 --></ div>
< div id= "tabs-2-tab" style= "display:none;" ><!-- your content 2 --></ div>
< div id= "tabs-3-tab" style= "display:none;" ><!-- your content 3 --></ div>
</ div>
< script type= "text/javascript" language= "javascript" >
var ccm_activeTransactionsTab = "tabs-1" ;
$( "#transaction_tabs a" ) . click( function ( ) {
$( "li.ccm-nav-active" ) . removeClass( 'ccm-nav-active' ) ;
$( "#" + ccm_activeTransactionsTab + "-tab" ) . hide( ) ;
< div>
< ul id= "transaction_tabs" class = "ccm-dialog-tabs" >
< li class = "ccm-nav-active" >< a href= "javascript:void(0);" id= "tabs-1" > New</ a></ li>
< li>< a href= "javascript:void(0);" id= "tabs-2" > Renewals</ a></ li>
< li>< a href= "javascript:void(0);" id= "tabs-3" > Updated</ a></ li>
</ ul>
< div id= "tabs-1-tab" ><!-- your content 1 --></ div>
< div id= "tabs-2-tab" style= "display:none;" ><!-- your content 2 --></ div>
< div id= "tabs-3-tab" style= "display:none;" ><!-- your content 3 --></ div>
</ div>
< script type= "text/javascript" language= "javascript" >
var ccm_activeTransactionsTab = "tabs-1" ;
$( "#transaction_tabs a" ) . click( function ( ) {
$( "li.ccm-nav-active" ) . removeClass( 'ccm-nav-active' ) ;
$( "#" + ccm_activeTransactionsTab + "-tab" ) . hide( ) ;
ccm_activeTransactionsTab = $( this) . attr( 'id' ) ;
$( this) . parent( ) . addClass( "ccm-nav-active" ) ;
$( "#" + ccm_activeTransactionsTab + "-tab" ) . show( ) ;
} ) ;
</script>