Эти строки я пишу через три месяца (публикую старый пост, не пропадать же плагинам). Здесь плагины с сайтов jQuery. Когда я их скачивал, то заметил некое "запустение", но не смог его объяснить... Я тогда "привинтил" к сайту заказчика парочку плагинов..., а сегодня (апрель) использовал бы Bootstrap или Foundation
Scroll inside of a fixed sidebar
service.rmlmenu.jquery is a jQuery plugin that offers a Responsive Multi-Level Menu. Using appropriate device queries in CSS it presents itself as a traditional multi-level dropdown menu on wide screens and as a popup menu on smaller screens.
A tutorial for service.rmlmenu.jquery - Responsive Multi-Level Menu November 14, 2014
Simple Sliding Sidebar Panels with jQuery - Sidebar Sidebar is a simple lightweight jQuery plugin to create vertical or horizontal sidebars sliding out form any edge of your browser screen. Ideal for mobile app-style togglable sidebar menu to improve the content readability on small screen devices.
Demo Toggle Right Toggle Bottom
Minimal Drawer Sidebar Plugin with jQuery - Sidebar.js Sidebar.js is an ultra-light jQuery plugin used to create a tabbed drawer sidebar that slides out from the edge of the screen on mouse hover. Great for sliding contact or feedback forms.
Demo jQuery Sidebar.js Demo Page
Vertical Fixed Navigation #2 A smart vertical navigation, with round indicators that turn into labelled icons when the user interacts with them.
Demo
jQuery toggle Method
Toggle between hide and show
Попробуем, как это рабтает здесь¶
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
%%html
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").toggle(1000);
});
});
</script>
<p>This is a paragraph.</p>
<button>Toggle between hide() and show()</button>
The toggle() method toggles between hide() and show() for the selected elements.
This method checks the selected elements for visibility. show() is run if an element is hidden. hide() is run if an element is visible - This creates a toggle effect.
Note: Hidden elements will not be displayed at all (no longer affects the layout of the page).
Tip: This method can also be used to toggle between custom functions.
$(selector).toggle(speed,easing,callback)
speed Optional. Specifies the speed of the hide/show effect Possible values: •milliseconds •"slow" •"fast"
easing Optional. Specifies the speed of the element in different points of the animation. Default value is "swing" Possible values: •"swing" - moves slower at the beginning/end, but faster in the middle •"linear" - moves in a constant speed Tip: More easing functions are available in external plugins
callback Optional. A function to be executed after the toggle() method is completed To learn more about callback, visit our jQuery Callback chapter
%%html
<script>
$(document).ready(function(){
$("button.0").click(function(){
$("p.1").toggle(2000, function(){
alert("The toggle() method is finished!");
});
});
});
</script>
<p class="1">This is a paragraph.</p>
<button class="0">Toggle between hide() and show()</button>
%%html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button.1").click(function(){
$("div").animate({
height: 'toggle'
});
});
});
</script>
<p>Click the button multiple times to toggle the animation.</p>
<button class="1" >Start Animation</button>
<p>By default, all HTML elements have a static position, and cannot be moved.
To manipulate the position, remember to first
set the CSS position property of the element to relative, fixed, or absolute!</p>
<div style="background:#98bf21;height:100px;width:100px;position:relative;"></div>
#aside {
position: fixed;
width: 250px;
overflow-y: scroll;
top: 0;
bottom: 0;
}
!dir ..\..\..\stradorusite\plugins
Посты чуть ниже также могут вас заинтересовать
Комментариев нет:
Отправить комментарий