<a href="https://console.cloud.google.com/apis/credentials">Get Your Api Credentials Here</a> <a href="https://calendar.google.com/calendar">Get your Calender ID</a> <?php include_once("wp-load.php"); function get_calender_events() { $params = array(); /*Get current date*/ $current_date = date('Y-m-d H:i:s'); /*Convert it to google calendar's rfc_format */ $rfc_format = date("c", strtotime($current_date)); $params[] = 'orderBy=startTime'; $params[] ='maxResults=100'; $params[] = 'timeMin='.urlencode($rfc_format); $url_param = ''; foreach($params as $param) { $url_param.= '&'.$param; } $calender_id = "calender_id"; $client_key = "client_key"; $url = "https://www.googleapis.com/calendar/v3/calendars/".$calender_id."/events?key=".$client_key."&singleEvents=true".$url_param; $list_events = wp_remote_post($url, ...
Magento mobile menu
<script>
var jq=jQuery.noConflict();
jq(document).ready(function(){
jq(".menu-nav-button").click(function(){
if ( jq( this ).hasClass( "close-menu" ) ) {
jq(this).removeClass('close-menu');
}else{
jq(this).addClass('close-menu');
}
jq("#mobile-memu").slideToggle();
});
jq(".parent > ul").hide();
jq("#mobile-memu").find("li").has("ul").addClass("closed").prepend("<img class='icon' src='<?php echo $this->getSkinUrl('images/icon_arrow_right.png'); ?>'/>");
jq("#mobile-memu").on("click", ".icon", function(e) {
jq(this).parent().find("ul").first().slideToggle();
if( jq(this).parent().hasClass("closed") ) {
jq(this).attr("src", "<?php echo $this->getSkinUrl('images/icon_arrow_down.png'); ?>");
jq(this).parent().removeClass("closed").addClass("open");
}
else {
jq(this).attr("src", "<?php echo $this->getSkinUrl('images/icon_arrow_right.png'); ?>");
jq(this).parent().removeClass("open").addClass("closed");
}
e.stopPropagation();
});
});
</script>
<style>
.main-menu .mobile-memu{ display:none; position:absolute; top:-2px; right:0; width:100%; z-index:999;}
.main-menu .mobile-memu .nav-container{ display:block;}
.main-menu .mobile-memu li{ display:block; text-align:left; background-color:#C6C7C8; padding:0; position:relative;}
.main-menu .mobile-memu ul li a span{ border:none;}
.main-menu .mobile-memu ul li a{ color:#fff; border-bottom:1px solid #fff; padding:15px 10px;}
.main-menu .mobile-memu ul li a:hover,
.main-menu .mobile-memu #nav ul li a:hover{ background-color:#FBDECC; color:#959595 !important; transition:all .3s; -moz-transition:all .3s; -o-transition:all .3s; -webkit-transition:all .3s;}
.main-menu .mobile-memu ul li:hover a span{ border-bottom:none;}
.main-menu .mobile-memu #nav ul li a{ padding:10px 25px; color:#fff !important;}
.main-menu .mobile-memu #nav ul,
.main-menu .mobile-memu #nav div{ left:0; position:static; width:100%;}
.main-menu .mobile-memu #nav ul li{ padding:0;}
.main-menu .mobile-memu #nav ul li + li{ background:#C6C7C8;}
.main-menu .mobile-memu .icon{ background:#fbdecc; color:#959595; text-align:center; font-size:18px; font-weight:normal; position:absolute; top:0; right:0; cursor:pointer; max-width:15px; padding:16px;}
.menu-nav{ width:42px; height:42px; display:none; position:absolute; top:18px; right:15px; z-index:9999;}
.menu-nav .menu-nav-button{ background-color:#c6c7c8; border:1px solid #fff; display:block; background-image:url(../images/mobile-menu.png); background-position:center center; background-repeat:no-repeat; text-indent:-99999px; width:40px; height:40px;}
.menu-nav .menu-nav-button.close-menu{background-image:url(../images/mobile-close.png);}
</style>
<div class="main-menu">
<span class="menu-nav">
<a href="javascript:void(0);" class="menu-nav-button">Menu</a>
</span>
<?php echo $this->getChildHtml('topMenu') ?>
<div id="mobile-memu" class="mobile-memu"> <?php echo $this->getChildHtml('topMenu') ?></div>
</div>
<script>
var jq=jQuery.noConflict();
jq(document).ready(function(){
jq(".menu-nav-button").click(function(){
if ( jq( this ).hasClass( "close-menu" ) ) {
jq(this).removeClass('close-menu');
}else{
jq(this).addClass('close-menu');
}
jq("#mobile-memu").slideToggle();
});
jq(".parent > ul").hide();
jq("#mobile-memu").find("li").has("ul").addClass("closed").prepend("<img class='icon' src='<?php echo $this->getSkinUrl('images/icon_arrow_right.png'); ?>'/>");
jq("#mobile-memu").on("click", ".icon", function(e) {
jq(this).parent().find("ul").first().slideToggle();
if( jq(this).parent().hasClass("closed") ) {
jq(this).attr("src", "<?php echo $this->getSkinUrl('images/icon_arrow_down.png'); ?>");
jq(this).parent().removeClass("closed").addClass("open");
}
else {
jq(this).attr("src", "<?php echo $this->getSkinUrl('images/icon_arrow_right.png'); ?>");
jq(this).parent().removeClass("open").addClass("closed");
}
e.stopPropagation();
});
});
</script>
<style>
.main-menu .mobile-memu{ display:none; position:absolute; top:-2px; right:0; width:100%; z-index:999;}
.main-menu .mobile-memu .nav-container{ display:block;}
.main-menu .mobile-memu li{ display:block; text-align:left; background-color:#C6C7C8; padding:0; position:relative;}
.main-menu .mobile-memu ul li a span{ border:none;}
.main-menu .mobile-memu ul li a{ color:#fff; border-bottom:1px solid #fff; padding:15px 10px;}
.main-menu .mobile-memu ul li a:hover,
.main-menu .mobile-memu #nav ul li a:hover{ background-color:#FBDECC; color:#959595 !important; transition:all .3s; -moz-transition:all .3s; -o-transition:all .3s; -webkit-transition:all .3s;}
.main-menu .mobile-memu ul li:hover a span{ border-bottom:none;}
.main-menu .mobile-memu #nav ul li a{ padding:10px 25px; color:#fff !important;}
.main-menu .mobile-memu #nav ul,
.main-menu .mobile-memu #nav div{ left:0; position:static; width:100%;}
.main-menu .mobile-memu #nav ul li{ padding:0;}
.main-menu .mobile-memu #nav ul li + li{ background:#C6C7C8;}
.main-menu .mobile-memu .icon{ background:#fbdecc; color:#959595; text-align:center; font-size:18px; font-weight:normal; position:absolute; top:0; right:0; cursor:pointer; max-width:15px; padding:16px;}
.menu-nav{ width:42px; height:42px; display:none; position:absolute; top:18px; right:15px; z-index:9999;}
.menu-nav .menu-nav-button{ background-color:#c6c7c8; border:1px solid #fff; display:block; background-image:url(../images/mobile-menu.png); background-position:center center; background-repeat:no-repeat; text-indent:-99999px; width:40px; height:40px;}
.menu-nav .menu-nav-button.close-menu{background-image:url(../images/mobile-close.png);}
</style>
<div class="main-menu">
<span class="menu-nav">
<a href="javascript:void(0);" class="menu-nav-button">Menu</a>
</span>
<?php echo $this->getChildHtml('topMenu') ?>
<div id="mobile-memu" class="mobile-memu"> <?php echo $this->getChildHtml('topMenu') ?></div>
</div>
Comments
Post a Comment