registerJs (" $('.phone .more').bind('click',function(){ $('.phone .more_block').toggle(); }); ", View::POS_READY, 'phone'); //$this->registerCssFile(Yii::$app->request->BaseUrl.'/css/style.css'); $this->registerJsFile (Yii::$app->request->baseUrl . '/js/basket.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); $this->registerJs (" $('#basket').basket(); ", View::POS_READY, 'basket'); $this->registerJsFile (Yii::$app->request->baseUrl . '/js/call.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); $this->registerJs (" $('#call').call({token:'" . Yii::$app->request->getCsrfToken () . "'}); ", View::POS_READY, 'call'); $this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); $this->registerJs (" var activeTab = $('.social li:first a').attr('id'); $('.'+activeTab+'_box').show(); $('.social li').click(function(){ $('.hide').hide(); var activeTab = $(this).find('a').attr('id'); //alert(activeTab); $('.'+activeTab+'_box').show(); return false; }); ", View::POS_READY, 'social'); // AssetBundle jcarousel :D // jquery-migrate $this->registerJsFile('http://code.jquery.com/jquery-migrate-1.3.0.js',[ 'position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset'] ]); // jcarousel $this->registerCssFile(Yii::$app->request->BaseUrl.'/js/jsor-jcarousel-7bb2e0a/skins/tango/skin.css'); $this->registerJsFile(Yii::$app->request->baseUrl.'/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js',[ 'position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset'] ]); $this->registerJs(" $('.jcarousel').jcarousel({ vertical: true, scroll: 1 }); ", View::POS_READY); // AssetBundle jcarousel :D [close] ?> beginPage () ?>
= Html::csrfMetaTags () ?>Подписаться на акции
'/subscribe']); ?> field ($subscribe, 'email')->textInput (['placeholder' => 'E-mail', 'enableAjaxValidation' => true])->label (false); ?> = $form->field ($subscribe, 'sale')->dropDownList (['10' => '10%', '20' => '20%'], ['prompt' => 'Скидка', 'enableAjaxValidation' => true])->label (false); ?>