The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Javascript Code
Posted by: ruzzdeezie | July 1, 2010 @ 1:12pm
Javascript Code
[
Download
]
/** $.log(m, x) * @author Russell Madsen russell [at] madsendev.com * @version Jan.2010 * @url http://www.madsendev.com/ * * @param m: The message you are wanting to log - it * could be an object, or string * @param x: The logging classification */ var logger = true;// set to false for production $.log = function(m, x){ //if logging is enabled, allow user to log messages if (!logger) {return false;} else if('console' in window && console.debug) { switch(x){ case 'debug':console.debug(m);break; case 'error':console.error(m);break; case 'info': console.info(m);break; case 'warn': console.warn(m);break; default: console.log(m); break; } } else { /*alert(m);*/ } } //function for flash to call to open the modal var openSignupModal = function(){ $('#flashgoeshere').css({'visibility':'hidden'}); $('#SWADenver').append('<div id="carousel-noscript" class="png_bg"></div>'); $.openDOMWindow({ borderSize:0, borderColor:'transparent', height:544, width:827, positionType:'absolute', positionTop:100, positionLeft:($(window).width()/2 - 408), loader:1, loaderImagePath:'/landing/den/images/sw-denver/loading.gif', loaderHeight:16, loaderWidth:17, windowPadding:0, windowSource:'ajax', windowHTTPType:'get', windowSourceURL:'/landing/den/entryform.html' }); $.log("after openDOMWINDOW"); } /**=== DOM READY ===**/ $( function(){ /**=== EVENT HANDLING ===**/ /* Actions for clicking the yes button * Action Taken on click: show the sign-up form */ /**==IE detection==**/ if($.browser.msie && $.browser.version=="6.0"){ //ie 6 actions $.fx.off = true; DD_belatedPNG.fix('.png_bg, .imgReplacement'); } else if( $.browser.msie ){ //general ie actions $('.btn_yes').blend({speed:300, top:true}); } else { //standards complient browsers' actions $('.btn_yes').blend({ speed:300, top:true }); } /* //Create ticker plugin - remove comments to enable if there is more than one item in the ticker $('.ticker').cycle({ fx: 'fade', timeout: 7000, speed: 1000, speedIn: 1000, speedOut: 'fast', pause: true }); */ function checkIfFlash(){ if( $('#SWADenver object').length ){ $.log("flash enabled :)"); //Hide JS related $('#jsgoeshere').hide(); //Detect version and give popup to the upload playerVersion = swfobject.getFlashPlayerVersion(); if(playerVersion.major < 12){ $.openDOMWindow({ borderSize:0, borderColor:'transparent', height:318, width:613, positionType:'absolute', positionTop:100, positionLeft:($(window).width()/2 - 306), loader:1, loaderImagePath:'/landing/den/images/sw-denver/loading.gif', loaderHeight:16, loaderWidth:17, windowPadding:0, windowSource:'ajax', windowHTTPType:'get', windowSourceURL:'/landing/den/ajax_flashinstall_popup.html' }); } } else { $.log("no flash enabled :("); //LOAD THE JS CAROUSEL AFTER THE PAGE AND ALL OTHER SCRIPTS IF NO FLASH IS ENABLED $("#carousel-noscript").hide(); $('#d_carousel .content').hide(); $('#d_carousel #no-script').hide(); $('#nine11').hide(); $('#d_carousel .content').load("ajax_carousel.html", function(){ setTimeout( function(){ $('#d_carousel #loading').fadeTo(1000, 0, function(){ $(this).remove();}); $('#d_carousel .content').fadeIn(1200, function(){ $(this).css({'display': 'block'}); }); }, 1200 ); }); } } //LOAD THE CAROUSEL AFTER THE PAGE AND ALL OTHER SCRIPTS var flashvars = {}; flashvars.xmlDir = "/landing/den/flash/xml/"; flashvars.flvDir = "/landing/den/flash/flv/denverlandingpage/"; flashvars.imageDir = "/landing/den/flash/images/denverlandingpage/"; var params = {}; params.wmode = "transparent"; params.base = ""; var attributes = {}; attributes.id = "flashgoeshere"; swfobject.embedSWF("flash/swf/SouthWestDenver.swf", "flashgoeshere", "960", "503", "9.0.0", "flash/swf/expressInstall.swf", flashvars, params, attributes, checkIfFlash); });
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.29 / 8
48 Votes
http://codebin.yi.org/726
page generated in 0.00 seconds