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
Personal coded jQuery
Posted by: Personal coded jQuery | February 20, 2009 @ 4:41pm
Javascript Code
[
Download
]
// Make sure that the '$' operater doesn't conflict with that of mootools var $j = jQuery.noConflict(); //$j.preloadImages("/templates/melle4/images/freshcontent_over.png"); // Put all your code in your document ready area $j(document).ready(function(){ // Setters var MOVIE_PLAYER = $j("#mainContent span.allvideos").html();// Set html code pieces var PHOTO_PLAYER = $j("#xcontainer").html();// Set html code pieces var PHOTO_BACK = $j("#backtogallery2").html();// Set html code pieces<div id="infotainmentboxMenubtn2"> var FOOTER_UL = $j("#footwrapper div.moduletable_footermenue").html(); var CLEANMAIN = $j("#mainContent div.NotNiceCleanContent").html(); /* putting <div class="NotNiceCleanContent"><strong>true</strong></div> into #mainContent will then show the main first */ $j('ul.menu').superfish({ delay: 1000, autoArrows: false, dropShadows: false, disableHI: false }); //$j("ul.infobox").superfish(); // muss noch gemacht werden if(CLEANMAIN === null) { // Test what to show, and toggle currect $j("#toggleNavigationFooter").append(FOOTER_UL); $j("#mainContent, div#footer, #toggleNavigationFooterPlaceHolder").hide(); $j("#toggleNavigationLink").toggle( function () { // Show main $j("#toggleNavigationFooter ul").remove(); //self.location.href='#mainNavigation'; $j("#mainContent").slideDown("slow"); $j("div#footer, #toggleNavigationFooter, #toggleNavigationFooterPlaceHolder").show(); }, function () { // Hide main $j("#toggleNavigationFooter").append(FOOTER_UL); $j("#mainContent").slideUp("slow"); $j("div#footer, #toggleNavigationFooterPlaceHolder").hide(); } ); } else { $j("#mainContent div.NotNiceCleanContent").hide(); self.location.href='#mainNavigation'; $j("#toggleNavigationLink").toggle( function () { // Hide main $j("#toggleNavigationFooter").append(FOOTER_UL); $j("#mainContent").slideUp("slow"); $j("div#footer, #toggleNavigationFooterPlaceHolder").hide(); }, function () { // Show main $j("#toggleNavigationFooter ul").remove(); $j("#mainContent").slideDown("slow"); $j("div#footer, #toggleNavigationFooter, #toggleNavigationFooterPlaceHolder").show(); } ); } // Finished mainContent // Start of the fresh content button //var FRESH_CONTENT = $j("#freshcontentbutton div.moduletable ul.menufreshcontent li:first").html(); // $j.preloadImages("/templates/melle4/images/freshcontent_over.png"); //$j("#freshcontentbutton").empty().append(FRESH_CONTENT); //$j("#freshcontentbutton a").empty(); //$j("#freshcontentbutton a").html( //"<img src='/templates/melle4/images/freshcontent.png' alt='freshcontent' name='freshcontent' width='174' height='154' border='0' id='freshcontent' usemap='#Map' /><map name='Map' id='Map'><area shape='poly' coords='74,-2,98,34,122,36,120,53,142,56,129,77,123,83,147,123,2,121,22,79,7,79,11,56,21,56,27,39,53,38' href='#' /></map>" // ); // Finished fresh content switch(false) { // testing for pull ups case (MOVIE_PLAYER === null): //Start movie $j("#infotainmentbox").empty().append(MOVIE_PLAYER); $j("#infotainmentbox").before('<div id="infotainmentboxMenubtn2"><a href="#" onClick="history.go(-1);" onfocus="this.blur()"><img src="/templates/melle4/images/goback.png" title="Go Back" height="29px" width="189px" border="0" /></a></div>'); break; case (PHOTO_PLAYER === null): // Start gallerie $j("#infotainmentbox").empty().append(PHOTO_PLAYER); $j("#infotainmentbox").before(PHOTO_BACK); $j("#backtogallery2").hide(); break; default: $j("#infotainmentbox div.video").empty(); //$j("#infotainmentbox"); change image } }); // End document ready
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.35 / 8
156 Votes
http://codebin.yi.org/241
page generated in 0.00 seconds