This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).keydown(function(e){ | |
speed = 3 | |
switch (e.keyCode) { | |
case 37: // Move Left | |
$('.dialog').offset({left: $('.dialog').offset().left - speed}); | |
break; | |
case 39: // Move Right | |
$('.dialog').offset({left: $('.dialog').offset().left + speed}); | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script = document.createElement("script"); | |
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"); | |
document.body.appendChild(script); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// url : http://id.wikipedia.org/wiki/Daftar_provinsi_Indonesia | |
arr = new Array(); | |
// random id from 0 - 5 | |
random_country_id = Math.floor(Math.random() * (5 - 1 + 1) + 1); | |
$('.wikitable.sortable.jquery-tablesorter tr').each(function(i, tr){ | |
td = $(tr).children()[2] | |
name = $(td).text(); | |
if(i < 11){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('form[action*="search"]').live('submit', function(event) { | |
event.preventDefault(); | |
arr_input = $('form').serializeArray(); | |
arr_input.shift(); | |
keywords_count = 0; | |
$.map(arr_input, function(el){ | |
if(el.value != ""){keywords_count = keywords_count + 1} | |
}); | |
if(keywords_count <= 0){ | |
if($('.error.empty-search').length < 1){ |
NewerOlder