Показать сообщение отдельно
  #2 (permalink)  
Старый 25.12.2013, 17:49
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,070

urivskay,
1 где искать hideShow?
2 две hideShow на одном элементе произведут нулевой результат - первая скроет вторая покажет - элемент никогда не станет невидимым
<!DOCTYPE HTML>
<html>
<head>
  <title>Untitled</title>
  <meta charset="utf-8">
  <style type="text/css">

  </style>
   <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/sunny/jquery-ui.css" />

  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>

  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>



</head>
<body>

<div class="link_hideShow" id="link_hideShow" >link_hideShow кликать тут</div>

<div id="table_categories">table_categories</div>

<div id="test">test</div>


<script>
$(function () {

     $.widget("interior.explorerCategory", $.ui.mouse, {
         options: {
             resizable: false,
             isCollapsed: false
         },
         lastListWithSelected: "",
         currentSelected: 0,

         _init: function () {
             alert("111");
             $(".link_hideShow").click(this.hideShow);
         },

         _create: function () {
             alert("222");
             // $(".link_hideShow").click(this.hideShow);
         },

         destroy: function () {
             $.widget.prototype.destroy.call(this);
         },

         hideShow: function () {
             if ($("#table_categories").is(':visible')) {
                 $("#table_categories").hide();
                 $("#link_hideShow").html("Показать");
             } else {
                 $("#table_categories").show();
                 $("#link_hideShow").html("Скрыть");
             }
         }
     });

     $.interior.explorerCategory();

 })
</script>
</body>
</html>
Ответить с цитированием