javascript and css problem

JavaScript and client side scripting.

Moderator: General Moderators

javascript and css problem

Postby avibitton » Tue Jul 17, 2012 8:28 am


i have a problem with javascript , im working on mobile orientation . so what i need to do its when its 90 degress so show #div1 and hide #div2
that part of the code:

makeWeatherSided = function(){
myOrientation = window.orientation==90 || window.orientation==-90 ? 0 : 1;
var temp = myOrientation;
if( myOrientation){

else {

but from reason whic i dont know , when im trying to hide the div drop2 .side_drop(thats the css when onside)

another quastion i have ,my css of the div when onside look like that :
.small #drop2.drop_sided{

width: 430px;
height: 178px;
margin:0px auto;
border:1px solid orange;

if i want to do action on this css how do i use it in jquery or javascript? , i tried to do something like :
$(" .small #drop2.drop_sided").fadeOut("slow");(didnt work of course) but i guess i cant use all this long name of css object , so how i can use the name of the css object in this case?

THX Avi .
Forum Newbie
Posts: 18
Joined: Sat Jul 14, 2012 4:35 pm

Return to Javascript

Who is online

Users browsing this forum: No registered users and 3 guests