- Screen name: kajkoo
kajkoo's Profile
4 Posts
7 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
Hi guys
I would like to make a jquery on scroll header effect. I've just added some changes in to the code but it's not working they way I want. I want to make the effect - when I scroll down a bit pixel for the header to change the height to small. Or show the hidden header with other styles
So when scrolling the normal header to slide up and then show the hidden header like slide down... I've spent much time on this but it's only working with fadeIn and fadeOut
- $(function() {
- $('.header-small').hide();
- var bar = $('header');
- var top = bar.css('top');
- $(window).scroll(function() {
- if($(this).scrollTop() > 50) {
- bar.stop().animate({'top' : '0px'}, 200);
- $('header').fadeOut('fast');
- $('.header-small').fadeIn('fast');
- } else {
- bar.stop().animate({'top' : '20px'}, 200);
- $('header').fadeIn('fast');
- $('.header-small').fadeOut('fast');
- }
- });
- });
Working demo / http://jsfiddle.net/qm4Zp/2/embedded/result/
Please could somebody help me with this?
Thanks
I try to make
slide up
andslide down
divs at one time.I want the first
div slide down
an the hidden nextdiv slide up
I would like to make these elements overlap when animated
jQuery
- $(document).ready(function() {
- $('.plus').click(function() {
- $('header h1').animate({
- 'margin-top': '999px',
- opacity: 'toggle'
- },
- 1500);
- $('header h2').animate({
- 'margin-top': '0px',
- opacity: 'show'
- },
- 1200);
- });
- $('.minus').click(function() {
- $('header h2').hide('slow');
- $('header h1').show('slow');
- });
- });
Thanks for any ideas !Demo here http://jsfiddle.net/n7Ejs/- Today a try add some extra animation into flexslider...that's everything is great the script work but need tune up for better working...So I want to explain this- 1 The slider now used only for words animation- 2 I want use animation like Animate from left step2 animate from bottomstep3 animate from top- The problem what i found is when define the animation "Fade" or "Slide" The first stepanimate with all effect but the next step olny slide or fade...- I think is not hard to fix ;) i am a newbie in jqueryThe animation processTEXT animate from left===============> 0px0px <=================TEXT animate from right/ \====TEXT animate from bottomThen next step is same with other animation.....demoThanks for any feedback!
How can I set a cookie when a background color is changed? I created a basic switcher which changes the body color, but I want to save the changed color in a cookie.
jQuery code:
$('.first li ').click(function (e) {
e.preventDefault(); $(this).parent().parent().find('img').removeClass('active');
$(this).addClass('active');
});
$('.first li').click(function (e) {
e.preventDefault(); $(this).parent().parent().find('img').removeClass('active');
$(this).addClass('active');
var src = $(this).find('img').attr('src');
$('body').css('backgroundImage', 'url(' + src + ')');
$.cookie('backgroundImage', bg, { expires: 365, path: '/' });
if ($.cookie("backgroundImage")) { $('body').css('backgroundImage', $.cookie("backgroundImage")); }
});
- «Prev
- Next »
Moderate user : kajkoo
© 2013 jQuery Foundation
Sponsored by and others.

