Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Client-side Scripting _ Closing the Slider using Jquery

Posted by: Enhanced Software Solutions Apr 17 2012, 08:22 AM

Hi to all,

I have designed one slider using Jquery. When ever focus is went on Options then slider will be opened from right to left displaying search,delete and clear buttons. My problem is that when i click on Options,the Slider should be closed .

Any Help in this regard

CODE

<div class="button_wrap">
            <a class="button_aLeft" id="" style="text-decoration:none"><span><input type="button" class="fb4" value="Search" style="text-decoration:none" onClick="search()"/></span><span><input type="button" class="fb4" value="Delete" style="text-decoration:none"/></span><span><input type="button" class="fb4" value="Clear"  style="text-decoration:none" onclick="clear_entry()"/></span></a>
            <a class="button_bLeft slidebttn" id="button_bLeft" style="background-color:black" style="text-decoration:none"><font color="white">Options</font></a>
        </div>
        <script type="text/javascript">
            $(function() {
                $('.slidebttn').hover(
                    function () {
                        var $this         = $(this);
                        var $slidelem     = $this.prev();
                        $slidelem.stop().animate({'width':'300px'},300);
                        $slidelem.find('span').stop(false,false).fadeIn();
                        $this.addClass('button_c');
                    },
                    function () {
                        var $this         = $(this);
                        var $slidelem     = $this.prev();
                        $slidelem.stop().animate({'width':'300px'},300);
                        $slidelem.find('span').stop(false,true).fadeIn();
                        $this.addClass('button_c');
                    }
                );
            });
         </script>


Thanks in Advance

I am Enclosing my js file alsoAttached File  New_Folder.zip ( 2.29k ) Number of downloads: 356
Attached ImageAttached Image

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)