Here is my CSS:
#optionHotel{
display:none;
}
Here is my JavaScript:
function cb1(type){
switch(type){
case "hotel":
alert("hotel");
$("#optionHotel").css("display","block");
break;
}
}
Here is my Html:
<div id="optionHotel"> Some Element In here</div>
Start Script in 'Head Tag':
<?echo '
<script>window.onload = cb1("'.$orderType.'");</script>
'?>
<!--CSS-->
<link href="../../css/navigate.css" rel="stylesheet"/>
<link href="../../css/reservation.css" rel="stylesheet"/>
Passing data from php to js is ok because I have checked In the switchcase
with alert() it's ok but I don't know why .css display to block doesn't work
please advice, Thank in advance
window.onload = function(){ cb1("orderType") }