سؤال

Finally if found the right jquery script that i need.

But i want to change the effect, now it's coming from the top-left corner and i want to let it slide to the left.

This is the code:

    <script type="text/javascript">
    $(document).ready(function() { 
        //add the click event to each element with the toggle class 
        $('a.toggle').click(function(){
            if ($(document).data("toggle-id")) {
                //item was already selected, hide it
                $("div.toggle#" + $(document).data("toggle-id")).hide(1000);
            }
            //save the new id for later, then show it
            $(document).data("toggle-id", $(this).text().toLowerCase());
            $("div.toggle#" + $(document).data("toggle-id")).show(1000)
       });
    });
</script>
هل كانت مفيدة؟

المحلول

You need to modify this line

$("div.toggle#" + $(document).data("toggle-id")).show(1000)

And try something like

$("div.toggle#" + $(document).data("toggle-id")).show('slide', {direction: 'left'}, 1000)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top