I have created an application in which i have added tabs section using coffeescript.this is the code of coffeescript file "clients.js.coffee"
$(document).ready ->
$('.tabs-menu a').click (event) ->
event.preventDefault()
$(this).parent().addClass 'current'
$(this).parent().siblings().removeClass 'current'
tab = $(this).attr('href')
$('.tab-content').not(tab).css 'display', 'none'
$(tab).fadeIn()
return
return
i have created two views such as show.html.erb and _form.html.erb. Now i want to get the content of the show.html.erb on the block of tab1 when i select it.and when i select tab2 the content of _form.html.erb on the block of the tab2. help will be deeply appreciated. thankyou in advance
Aucun commentaire:
Enregistrer un commentaire