我有两种不同的形式,modulo-1
和modulo-2
。 1用于预订,2用于取消预订。我需要仅在单击相对按钮后才能显示正确的表单。
单击按钮后,我设法隐藏了不需要的表单,但是我的问题是,当我打开页面时,两个表单都可见。我该如何解决?
jQuery(function() {
var bottone = jQuery('[class^="bottone"]');
bottone.click(function() {
bottone.removeclass('active')
jQuery(this).addClass('active')
var numero = jQuery(this).data('numero')
jQuery('.modulo-' + numero).fadeIn().siblings('[class^="modulo"]').fadeOut()