Results 1 to 2 of 2

Thread: how to make this footer slider, open when start?

  1. #1
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default how to make this footer slider, open when start?

    I have this script to make the footer slide-up when it's click:
    Code:
    <script src="script/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    	$(function() {
    		$('#footerSlideButton').click(function () {
    			$('#footerSlideContent').slideToggle();
    		});
    	});
    </script>
    or you can see it here:
    http://imaxxo.net/fott/

    How to make the script that make my footer content open first?

    Thanks you very much...
    _____________________

    David Demetrius // davejob
    _____________________

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Three choices (there are others) for now -

    1. In style.css line 566 (highlighted):

      Code:
      		#footerSlideContent {
      			width: 100%;
      			height: 116px;
      			display:none;
      			margin-top:-20px;
      		}
      Get rid of that.

    2. Or, for a bit of a delay have the script execute (addition red):

      Code:
      <script type="text/javascript">
      	$(function() {
      		$('#footerSlideButton').click(function () {
      			$('#footerSlideContent').slideToggle();
      		}).click();
      	});
      </script>
    3. Or, for more of a delay before it slides into view:

      Code:
      <script type="text/javascript">
      	$(function() {
      		$('#footerSlideButton').click(function () {
      			$('#footerSlideContent').slideToggle();
      		})
      	});
      	$(window).load(function(){
      		$('#footerSlideButton').click();
      	});
      </script>

    BTW, there's an unrelated script error on the page. This sound code appears left over from a previous edit:

    Code:
                        <!-- Begin Toggle Sound Body Code -->
                            <!--[if IE]>
                            <script type="text/javascript">
                            if(mpIsInstalled)
                            document.write('<object id="sound" height="0" width="0"'+
                            '  classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">\n'+
                            '<param name="playCount" value="20000">\n'+
                            '<\/object>\n');
                            else
                            document.write('<bgsound id="sound" src="" loop="-1">')
                            </script>
                            <![endif]-->
                            
                            <script type="text/javascript">
                            if (document.getElementById&&!document.getElementById('sound')){
                            document.write('<di . . .
    Last edited by jscheuer1; 06-21-2011 at 04:42 AM. Reason: elaborate
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •