Click here to Skip to main content
12,403,948 members (64,526 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: CSS HTML
Hello

I need to show header with animation .Actually i have two header (header and advertisement ).If user click any where in screen it remove the existing header(example header) and show the another header(advisement header) with rotation.can you please tell me how to do that.

toggleHeaderBar : function() {
		console.log("toggleHeaderBar clicked");
		if ($('#headerRegion').offset().top != 0) {
			$('#headerRegion').css({
				"top" : "0px",
			//	"-webkit-transition" : "0.8s"
			});
			$('#advertisementRegion').css({
				"top" : "-300px",
				//"-webkit-transition" : "0.8s"
			});
			console.log("**************headerRegion***************");
			//*****************************Naveen*****************************
			//$('#advertisementRegion').css({"top" : "0px", "-webkit-transition":"rotateX(120deg)"});
			$('#bodyContentRegion').css({"top" : "55px", "-webkit-transition":"0.6s"});
		} else {
		console.log("**************advertisementRegion***************");
			$('#headerRegion').css({
				"top" : "-300px",
				//"-webkit-transition" : "4s"
			});
			$('#advertisementRegion').css({
				"top" : "0px",
				//"-webkit-transition" : "0.8s"
			});
			//$('#advertisementRegion').fadeIn(3000);
			//$('#advertisementRegion').css({"display":"block","top" : "0px", "-webkit-transition":"rotate(145deg)"});
			 $('#advertisementRegion').animate({
        'marginTop' : 180
    },{
        duration:750,
        step: function(now, fx) {
            $('#advertisementRegion').css('transform','rotate(' + 60 + 'deg)');
        }
    });
			$('#advertisementRegion').delay(300).animate({rotate: '80deg'}, 500);
			//$('#bodyContentRegion').css({"top" : "0px", "-webkit-transition":"0.6s"});
 //****************************************Naveen
		}
 
	},
Posted 28-Apr-13 21:20pm
v2
Comments
ryanb31 29-Apr-13 8:10am
   
I would search for a jquery plugin to help with this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160721.1 | Last Updated 29 Apr 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100