문제

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