$('.list-tab a').click(function(){
alert($('div').data('status'));
if($('div').data('status') == true){
$('div').attr('data-status','false');
}else{
$('div').attr('data-status','true');
}
});
<?php
namespace app\modules\admin;
use Yii;
class Module extends \yii\base\Module{
public $controllerNamespace = 'app\modules\admin\controllers';
public function init(){
parent::init();
Yii::configure($this, [
'components'=>[
'urlManager'=>[
'class' => 'yii\web\UrlManager',
'showScriptName' => false,
'enablePrettyUrl' => true,
'rules' => [
'admin/category/<id:\d+>'=>'admin/category/view',
],
],
],
]);
}
}
'modules' => [
'admin' => [
'class' => 'app\modules\admin\Module',
'layout'=>'admin',
'components'=>[
'urlManager'=>[
'class' => 'yii\web\UrlManager',
'showScriptName' => false,
'enablePrettyUrl' => true,
'rules' => [
'admin/category/<id:\d+>'=>'admin/category/view',
],
],
],
],
],
<div style="display:block">Ntrcn</div>
if(div_window.style.display=="none")
{
show_hide_link.innerHTML="Скрыть";
div_window.show()
}
else{
show_hide_link.innerHTML="Показать";
div_window.hide()
}
вот код
при клике все равно вернёт фалс