1# jQuery实现在鼠标滚动后导航栏保持固定
sadadasd
2#overlay
css:
.lightboxOverlay {
position: absolute;
top: 0;
left: 0;
z-index: 9999;
background-color: #000;
opacity: .8;
display: none;
}
.fullscreen-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.4;
background: #000;
}
Jq:
$hamburger.on('click', function() {
$menu_mobile.addClass('active');
$menu_mobile.hasClass('slide-in') ? $menu_mobile.removeClass('slide-in').addClass('slide-out') : $menu_mobile.removeClass('slide-out').addClass('slide-in');
var $overlay = $('.fullscreen-overlay');
var $body = $('body');
$overlay.css('display', '');
if($overlay.length <= 0) {
$body.append('');
$overlay = $('.fullscreen-overlay');
}
if($menu_mobile.hasClass('slide-out')) {
$overlay.css('display', 'none');
}
$overlay.on('click', function() {
$(this).css('display', 'none');
$menu_mobile.removeClass('slide-in').addClass('slide-out');
});
});
3 # jQuery实现显示隐藏加动画
html
Posting Tips
jquery:
;(function($){
'use strict';
$(function(){
var $post_tips = $('.posting-tips');
var $tips_icon = $post_tips.find('.tips-icon');
var $tips_message = $post_tips.find('.tips-message');
$tips_icon.on('click', function () {
$tips_message.slideToggle();
if ($post_tips.hasClass('open')) {
$post_tips.removeClass('open');
}else {
$post_tips.addClass('open');
}
});
});
})(LITHIUM.jQuery);
html和jquery:
Welcome to Your Community
Hi everyone,
Welcome to the AGL Community, a delicated online space to share, discuss, and learn about all things energy-related.
This community has been built by you, for you. Information, advice, ideas, and answers are just a few clicks away.
-
Community Basics
Our Community provide a place for members or participants to search for information, read and post about topics of interest, learn from each other share tips and experiences, and discuss topics like renewables, energy technulogy etc.
-
Need immediate, specific account/billing assistance?
While we want to help you effectively manage your energy, the Community is not suited to handle 1:1 service enquiries. To help with account and billing questions where you need to share sensitive information (i.e. your account and personal details), please contact us on Facebook Messenger, chat or call us 24/7 on 131 245.
-
Why register and become a member?
Feel free to browse discussion topics and our FAQs for information and answers.
Registering lets you take full advantage of the community, enabling you to give likes, vote on ideas, interact with other community members, or set customisation preferences.
-
Sign up options
Already have an AGL My Account or the AGL app? Use this same email address or log in details to easily access and start contributing on the Community.
Not a current AGL customer? Don't already have an AGL online account? That's ok too! Our community is for anyone interested in chatting energy. Join up simply using your name and email address.
-
How to get involved
1. Review our simple ‘house rules’ to be followed by all of our community members. We want you to feel at all times that your thoughts and opinions matter and are respected.
2. Search the Community for information
3. View our FAQs for answers and information published by experts
4. Ask your own question or join an existing discussion.
5. Let someone know that you appreciate their contribution. You’ll find a thumbs up icon-switch at the bottom of each post to give them a ‘like’
-
How to write a great post
1. Make your subject clear and concise including relevant keywords. Your subject is the only part of the message that shows in discussion topic preview posts. Remember not to share any personal information.
2. To encourage replies, in the body include all relevant details, especially for technical topics and ask ended questions
3. Help others discover your post by adding Tags. These are related single keywords or phrases. Enter them in the ‘Message Tags’ field separated by a comma
-
Feedback is welcome!
We want to hear what you think of the Community site. Good or bad, we don't mind. Add your feedback or suggestion to our Ideas Board here. Or, you can private message the Community Manager if you're more comfortable doing it that way.
-
Meet your AGL Community team
Your Community Manager is me - Sam, better known by my screen name Samjy. Our fabulous moderators are Jayden, The RealDaveyG and Jordanemm.
If you have any queries or concerns, or just want to say hello, feel free to give us a shout!
<@liaAddScript>
;(function($){
'use strict';
$(function(){
function accordionClick() {
var $accordionWrap = $('.accordion-item-list');
var $switch = $accordionWrap.find('.icon-switch');
$switch.on('click', function() {
var $curItem = $(this).parent('.title').parent('.item');
$curItem.hasClass('open') ? $curItem.removeClass('open') : $curItem.addClass('open');
var $this_text = $(this).parent('.title').parent('.item').children('.text');
$this_text.slideToggle();
});
}
accordionClick();
});
})(LITHIUM.jQuery);
@liaAddScript>
1# jQuery实现头部,侧栏显示隐藏动画效果
.aside-pushy-right {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
transition: all 0.5s;
&.open {
opacity: 1;
visibility: visible;
transform: translate3d(0, 0, 0);
z-index: 1000;
}
}
用max-height代替display实现动画效果
max-height: 0;
transition: max-height 0.3s;
-moz-transition: max-height 0.3s;
-webkit-transition: max-height 0.3s;
overflow: hidden;
max-height: 150px;