Hi,
Since 3 hours i'am looking for a way to combine .sortable
and .slideToggle.
At irc nobody was able to help me. At google i dosnt found anything.
ThrushAAX (at irc) told me that i should describe my problem here.
I want that the user is able to sort a list. The items of the list
should be able to toggle.
If i has sorted an item its always toggle. That should not be.
In my opinion i have only to check that .sortable has not run. But i
don't found a way how to do this. I tested some ways. For example used
the start/stop event to set a global variable true/false and checked
it before the toggle runs. But its dos not work. The variable was
always false, for do not running. my code has look like this:  $
("#sort").sortable({start:function(event,ui){sort=false),stop:function
(event,ui){sort=true)}}).

I hope you are able to help me.

I used the follow script (http://pastie.org/611469) to use toggle and
sortable, without any running checks.

#### My script

<script type="text/javascript">
  sort = false;
</script>
<ul id="sort">
  <li>
        <div id="toogle1" class="toogle">Acount1</div>
        <div class="down" id="profile1">
            <table>
                <tr>
                    <td>Username:</td><td><input type="text"
value="Acount 1"></td>
                    <td>Password:</td><td><input type="password"
value="Passed"></td>
                </tr>
            </table>
        </div>
        <script type="text/javascript">
            $(document).ready(function(){
        $('#toogle1').click(function () {
          $('#profile1').slideToggle(300, function(){
            $('#toogle1').toggleClass('up');
          });
        });
            });
        </script>
    </li>
    <li>
        <div id="toogle2" class="toogle">Acount2</div>
        <div class="down" id="profile2">
            <table>
                <tr>
                    <td>Username:</td><td><input type="text"
value="Acount 2"></td>
                    <td>Password:</td><td><input type="password"
value="Passed"></td>
                </tr>
            </table>
        </div>
        <script type="text/javascript">
            $(document).ready(function(){
        $('#toogle2').click(function () {
                        alert(sort);
          $('#profile2').slideToggle(300, function(){
            $('#toogle2').toggleClass('up');
          });
        });
            });
        </script>
    </li>
</ul>
<script type="text/javascript">
$(document).ready(function(){
        $("#sort").sortable({
        })
});
</script>


mfg zeaL_Zack

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to