Skip to content

Instantly share code, notes, and snippets.

@alph4delta
Created July 21, 2016 18:05
Show Gist options
  • Save alph4delta/a86fad124e0be9ebbefd4f7c7d661c30 to your computer and use it in GitHub Desktop.
Save alph4delta/a86fad124e0be9ebbefd4f7c7d661c30 to your computer and use it in GitHub Desktop.
Gist of var navLoadMenu = function()
{
$.ajax({
url: 'https://cdn.detik.net.id/libs/dc/v1/menu.js',
jsonp: true,var navLoadMenu = function()
jsonpCallback:'dtkmenu',
dataType: "jsonp",
success: function( response ) {
$('#drop_kanal').append(response[0] );
$('.drop_kanal .menu_k').css('height',$( window ).height()*0.8);
}
});
}
$('#ico_detik').click(function(){
if (! $('#drop_kanal').find('.menu_k').length)
navLoadMenu();
if($( "#ico_detik" ).hasClass( "active" )){
$("#drop_kanal").fadeOut(200);
$(".ico_detik").removeClass("active");
}
else {
$("#drop_kanal").fadeIn(200);
$(".ico_detik").addClass("active");
}
});
$('#fm_user').click(function(){
if($( "#fm_user" ).hasClass( "active" )){
$("#drop_users").fadeOut(200);
$(".fm_user").removeClass("active");
}
else {
$("#drop_users").fadeIn(200);
$(".fm_user").addClass("active");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment