<script>
$("p").click(function () {
$('#tab-1').click();
});
</script>
<style>
p { color:red; margin:5px; cursor:pointer; }
</style>
</head>
<body>
<p>вызвать</p>
инициировать вызов вкладки, когда другой элемент нажат
#1
Отправлено 07 January 2013 - 01:53
#2
Отправлено 08 January 2013 - 13:21
Как минимум нужно сделать так
jQuery(function($){
$(".elementClass").click(function () {
$('#tab-1').trigger('click');
});
});
Отключайте проверку лицензий как можно скорее!
— Есть два типа людей: Кто еще не делает бекапы и кто уже делает бекапы.
#3
Отправлено 08 January 2013 - 18:55
<head>
<script type="text/javascript">
jQuery(function($){
$(".menu").click(function () {
$('#tab').trigger('click');
});
});
</script>
</head>
<body>
<p><form method="post" action="#tab-comments">
<input type="submit" value="Забронировать" />
</form>
</p>
</body>
и так<head>
<script type="text/javascript">
jQuery(function($){
$(".menu").click(function () {
$('#tab-lux2').trigger('click');
});
});
</script>
</head>
<body>
<p><form method="post" action="<?php if ($this->checkPosition('bron')) : ?><?php echo $this->renderPosition('bron'); ?>
<?php endif; ?>">
<input type="submit" value="Забронировать" />
</form>
</p>
</body>
второй вариант создал для того чтобы можно было вставить кнопку забронировать в таб а при нажатии на нее переходил на другой таб, но не получается, а просто на странице (без табов) работает?
#4
Отправлено 08 January 2013 - 18:56
#5
Отправлено 08 January 2013 - 19:03
проверяйте верстку.
Отключайте проверку лицензий как можно скорее!
— Есть два типа людей: Кто еще не делает бекапы и кто уже делает бекапы.
#6
Отправлено 08 January 2013 - 19:07
<script type="text/javascript">
jQuery(function($){
$(".menu").click(function () {
$('#tab').trigger('click');
});
});
</script>
</head>
<body>
<p><form method="post" action="#tab-comments">
<input type="submit" value="Забронировать" />
</form>
</p>
</body>
и все заработалоа можно ли сделать так чтобы страница не обновлялась, а просто переходила на нужный таб?
#7
Отправлено 11 January 2013 - 13:15
после
<?php $this->app->jbassets->jQueryUi(); ?>
<script type="text/javascript">
jQuery(function ($) {
$('#jbzoo-tabs').tabs();
});
</script>
<?php endif; ?>
вставил
<script type="text/javascript">
jQuery(function(){
$(".accordion h3:first").addClass("active");
$(".accordion p:not(:first)").hide();
$(".accordion h3").click(function(){
$(this).next("p").slideToggle("slow")
.siblings("p:visible").slideUp("slow");
$(this).toggleClass("active");
$(this).siblings("h3").removeClass("active");
});
});
</script>
и
<div class="accordion">
<h3>Удобства</h3>
<p> <?php if ($this->checkPosition('text')) : ?>
<div class="rborder item-body">
<?php echo $this->renderPosition('text'); ?>
</div>
<?php endif; ?> </p>
<h3>Бронирование</h3>
<p><?php if ($this->checkPosition('text')) : ?>
<div class="rborder item-body">
<?php echo $this->renderPosition('text'); ?>
</div>
<?php endif; ?></p>
<h3>Дополнительно</h3>
<p><?php if ($this->checkPosition('text')) : ?>
<div class="rborder item-body">
<?php echo $this->renderPosition('text'); ?>
</div>
<?php endif; ?></p>
</div>
#8
Отправлено 11 January 2013 - 18:37
Спасибо за понимание.
Отключайте проверку лицензий как можно скорее!
— Есть два типа людей: Кто еще не делает бекапы и кто уже делает бекапы.


Тема закрыта








