سؤال

If you go to http://www.rabondigital.com you will see a symbol in the left hand corner of the website. Click the symbol and you will see a slick div slide out. How is this accomplished using javascript or jquery?

هل كانت مفيدة؟

المحلول

The site achieves this with jQuery slide effect toggle. Learn more here.

Example (from link above):
HTML:

<p>Click anywhere to toggle the box.</p>
<div style="width: 100px; height: 100px; background: #ccc;" id="toggle"></div>

JS:

$( document ).click(function() {
  $( "#toggle" ).toggle( "slide" );
});

Fiddle.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top