PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Dec 22, 2014 12:36 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Jul 17, 2012 8:28 am 
Offline
Forum Newbie

Joined: Sat Jul 14, 2012 4:35 pm
Posts: 18
Hi

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:

<script>
makeWeatherSided = function(){
myOrientation = window.orientation==90 || window.orientation==-90 ? 0 : 1;
var temp = myOrientation;
if( myOrientation){
$("#naming").removeClass("naming_sided");
$("#drop2").removeClass("drop_sided");
$("#drop").removeClass("drop_sided");

}
else {
$("#drop2").removeClass("drop_sided");
$("#drop").addClass("drop_sided");
$("#drop2").addClass("drop_sided");
$("#naming").addClass("naming_sided");
}
</script>

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;
min-width:300px;
text-align:right;
background-color:#413839;
margin:0px auto;
border:1px solid orange;
margin-top:-214px;
display:none;

}
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 .


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group