JavaScript - Content Blocker For Blogger.
hey guys im having a real problem with finding a script to lock my content for blogger, heres an example of the script
Quote: http://www.blackhatcodebreaker.com/prison/index.html i have bought this script but does not work in blogger.com, can someone edit this script for me so it can work on bloger? you have to have the files hosted on your webhost.. Similar Tutorialspop up blocker is stopping my user action from using window.open. It is a html button that i want to open a dialog to tell the user his item was added to the shopping cart. The sumbit_cart() function is supposed to send a request via ajax then use window.open to open the dialog if the ajax function was successful. Code: <input type="button" value="Add to Cart" onclick="return submit_cart();" /> I can understand the pop up blocker from blocking random pop ups but this is a user triggered event i don't see why it isn't allowing it. What can i do to make this work? Hey Guys, I'm trying to make a popup. Let me rephrase, not the type of popup that we all have cursed upon! But the same concept. I have a "control panel" type web application that i have developed. It is all completely dynamic. Each application has its own index.php file. My problem is, one of my applications i need has to open in a new window since its an external site. My problem is the way i have it setup dynamically in php i MUST have that inital index.php file. So what i have tried is to put in that index file just some javascript that opens a new window. Of course both IE and FF's popup blocker kick in. I need to find away around this. Does anyone have any ideas? So far i'd tried a window.open.... also tried creating a link with a target and id and then using click(); to deploy it. And i even tried creating a fake form with a target and an id and submiting it with javascript. Everything gets blocked. Thanks in advance, Jamie Hi everyone! I am trying to edit a color on a javascript query for a blogger site. I'm a newbie and looking hard for a solution. Hope it's an easy answer. Thank you in advance. http://newmomcents.blogspot.com/ On the left, there is a gray box that is holding the moving images. I am hoping to change the color to something that would compliment my blog theme. I am complete newbie to this topic and i want to know how to add and external javascript file for blogger. I have heard that it decreases the load time of a page. Again please explain clearly as iam a newbie!! Any help would be appreciated!! Thanks In Advance!! With Blogger you have to 'pre-install' the jQuery code into the main coding, which I already did. Installed correctly, per help of other online forums. The problem I'm having now, is the CSS & HTML is coming together beautifully, but the hover effects are not working on the two drop-down options with multiple links. It is supposed to yield this: Ardor | CSS MenuMaker This is the proposed Javascript, that for some reason is not working. Code: <script type="text/javascript"> (function($){ $(document).ready(function(){ $('#cssmenu').prepend('<div id="menu-button">Menu</div>'); $('#cssmenu #menu-button').on('click', function(){ var menu = $(this).next('ul'); if (menu.hasClass('open')) { menu.removeClass('open'); } else { menu.addClass('open'); }); }); })(jQuery); </script> The HTML portion is: Code: @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700); #cssmenu, #cssmenu ul, #cssmenu ul li, #cssmenu ul li a, #cssmenu #menu-button { margin: 0; padding: 0; border: 0; list-style: none; line-height: 1; display: block; position: relative; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #cssmenu:after, #cssmenu > ul:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } #cssmenu #menu-button { display: none; } #cssmenu { z-index: 999; width: 750px; font-family: 'Open Sans', Helvetica, sans-serif; background: #ffffff; background: -moz-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #ebebeb)); background: -webkit-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: -o-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: -ms-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: linear-gradient(to bottom, #ffffff 0%, #ebebeb 100%); } #cssmenu > ul { background: url('bg.png'); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.05); } #cssmenu.align-right > ul > li { float: right; } #cssmenu > ul > li { float: left; display: inline-block; } #cssmenu.align-center > ul { float: none; text-align: center; font-size: 0; } #cssmenu.align-center > ul > li { float: none; } #cssmenu.align-center ul ul { text-align: left; } #cssmenu > ul > li > a { padding: 18px 25px 21px 25px; border-right: 1px solid rgba(80, 80, 80, 0.12); text-decoration: none; font-size: 10px; font-weight: 700; color: #a19393; text-transform: uppercase; letter-spacing: 1px; } #cssmenu > ul > li:hover > a, #cssmenu > ul > li > a:hover, #cssmenu > ul > li.active > a { color: #ffffff; background: #f7f7f7; background: rgba(0, 0, 0, 0.1); } #cssmenu > ul > li.has-sub > a { padding-right: 45px; } #cssmenu > ul > li.has-sub > a::after { content: ""; position: absolute; width: 0; height: 0; border: 6px solid transparent; border-top-color: #a19393; right: 17px; top: 20.5px; } #cssmenu > ul > li.has-sub.active > a::after, #cssmenu > ul > li.has-sub:hover > a { border-top-color: #ffffff; } #cssmenu ul ul { position: absolute; left: -9999px; top: 60px; z-index: 9999; padding-top: 6px; font-size: 10px; opacity: 0; -webkit-transition: top 0.2s ease, opacity 0.2s ease-in; -moz-transition: top 0.2s ease, opacity 0.2s ease-in; -ms-transition: top 0.2s ease, opacity 0.2s ease-in; -o-transition: top 0.2s ease, opacity 0.2s ease-in; transition: top 0.2s ease, opacity 0.2s ease-in; } #cssmenu.align-right ul ul { text-align: right; } #cssmenu > ul > li > ul::after { content: ""; position: absolute; width: 0; height: 0; border: 5px solid transparent; border-bottom-color: #ffffff; top: -4px; left: 20px; } #cssmenu.align-right > ul > li > ul::after { left: auto; right: 20px; } #cssmenu ul ul ul::after { content: ""; position: absolute; width: 0; height: 0; border: 5px solid transparent; border-right-color: #ffffff; top: 11px; left: -4px; } #cssmenu.align-right ul ul ul::after { border-right-color: transparent; border-left-color: #ffffff; left: auto; right: -4px; } #cssmenu > ul > li > ul { top: 120px; } #cssmenu > ul > li:hover > ul { top: 49px; left: 0; opacity: 1; } #cssmenu.align-right > ul > li:hover > ul { left: auto; right: 0; } #cssmenu ul ul ul { padding-top: 0; padding-left: 6px; } #cssmenu.align-right ul ul ul { padding-right: 6px; } #cssmenu ul ul > li:hover > ul { left: 140px; top: 0; opacity: 1; } #cssmenu.align-right ul ul > li:hover > ul { left: auto; right: 100%; opacity: 1; } #cssmenu ul ul li a { text-decoration: none; font-weight: 400; padding: 11px 25px; width: 140px; color: #a19393; background: #ffffff; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 1px 1px 1px rgba(0, 0, 0, 0.1), -1px 1px 1px rgba(0, 0, 0, 0.1); } #cssmenu ul ul li:hover > a, #cssmenu ul ul li.active > a { color: #ffffff; } #cssmenu ul ul li:first-child > a { border-top-left-radius: 3px; border-top-right-radius: 3px; } #cssmenu ul ul li:last-child > a { border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; } #cssmenu > ul > li > ul::after { position: absolute; display: block; } #cssmenu ul ul li.has-sub > a::after { content: ""; position: absolute; width: 0; height: 0; border: 4px solid transparent; border-left-color: #a19393; right: 17px; top: 14px; top: 12.5px; } #cssmenu.align-right ul ul li.has-sub > a::after { border-left-color: transparent; border-right-color: #a19393; right: auto; left: 17px; } #cssmenu ul ul li.has-sub.active > a::after, #cssmenu ul ul li.has-sub:hover > a::after { border-left-color: #ffffff; } #cssmenu.align-right ul ul li.has-sub.active > a::after, #cssmenu.align-right ul ul li.has-sub:hover > a::after { border-right-color: #ffffff; border-left-color: transparent; } @media all and (max-width: 800px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1024px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min-resolution: 192dpi) and (max-width: 1024px), only screen and (min-resolution: 2dppx) and (max-width: 1024px) { #cssmenu { background: #ffffff; } #cssmenu > ul { display: none; } #cssmenu > ul.open { display: block; border-top: 1px solid rgba(0, 0, 0, 0.1); } #cssmenu.align-right > ul { float: none; } #cssmenu.align-center > ul { text-align: left; } #cssmenu > ul > li, #cssmenu.align-right > ul > li { float: none; display: block; } #cssmenu > ul > li > a { padding: 18px 25px 18px 25px; border-right: 0; } #cssmenu > ul > li:hover > a, #cssmenu > ul > li.active > a { background: rgba(0, 0, 0, 0.1); } #cssmenu #menu-button { display: block; text-decoration: none; font-size: 13px; font-weight: 700; color: #a19393; padding: 18px 25px 18px 25px; text-transform: uppercase; letter-spacing: 1px; background: url('bg.png'); cursor: pointer; } #cssmenu ul ul, #cssmenu ul li:hover > ul, #cssmenu > ul > li > ul, #cssmenu ul ul ul, #cssmenu ul ul li:hover > ul, #cssmenu.align-right ul ul, #cssmenu.align-right ul li:hover > ul, #cssmenu.align-right > ul > li > ul, #cssmenu.align-right ul ul ul, #cssmenu.align-right ul ul li:hover > ul { left: 0; right: auto; top: auto; opacity: 1; width: 100%; padding: 0; position: relative; text-align: left; } #cssmenu ul ul li { width: 100%; } #cssmenu ul ul li a { width: 100%; box-shadow: none; padding-left: 35px; } #cssmenu ul ul ul li a { padding-left: 45px; } #cssmenu ul ul li:first-child > a, #cssmenu ul ul li:last-child > a { border-radius: 0; } #cssmenu #menu-button::after { display: block; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; content: ''; position: absolute; height: 3px; width: 22px; border-top: 2px solid #a19393; border-bottom: 2px solid #a19393; right: 25px; top: 18px; } #cssmenu #menu-button::before { display: block; content: ''; position: absolute; height: 3px; width: 22px; border-top: 2px solid #a19393; right: 25px; top: 28px; } #cssmenu > ul > li.has-sub > a::after, #cssmenu ul ul li.has-sub > a::after { display: none; } } The CSS portion is: Code: @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700); #cssmenu, #cssmenu ul, #cssmenu ul li, #cssmenu ul li a, #cssmenu #menu-button { margin: 0; padding: 0; border: 0; list-style: none; line-height: 1; display: block; position: relative; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #cssmenu:after, #cssmenu > ul:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } #cssmenu #menu-button { display: none; } #cssmenu { z-index: 999; width: 750px; font-family: 'Open Sans', Helvetica, sans-serif; background: #ffffff; background: -moz-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #ebebeb)); background: -webkit-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: -o-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: -ms-linear-gradient(top, #ffffff 0%, #ebebeb 100%); background: linear-gradient(to bottom, #ffffff 0%, #ebebeb 100%); } #cssmenu > ul { background: url('bg.png'); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.05); } #cssmenu.align-right > ul > li { float: right; } #cssmenu > ul > li { float: left; display: inline-block; } #cssmenu.align-center > ul { float: none; text-align: center; font-size: 0; } #cssmenu.align-center > ul > li { float: none; } #cssmenu.align-center ul ul { text-align: left; } #cssmenu > ul > li > a { padding: 18px 25px 21px 25px; border-right: 1px solid rgba(80, 80, 80, 0.12); text-decoration: none; font-size: 10px; font-weight: 700; color: #a19393; text-transform: uppercase; letter-spacing: 1px; } #cssmenu > ul > li:hover > a, #cssmenu > ul > li > a:hover, #cssmenu > ul > li.active > a { color: #ffffff; background: #f7f7f7; background: rgba(0, 0, 0, 0.1); } #cssmenu > ul > li.has-sub > a { padding-right: 45px; } #cssmenu > ul > li.has-sub > a::after { content: ""; position: absolute; width: 0; height: 0; border: 6px solid transparent; border-top-color: #a19393; right: 17px; top: 20.5px; } #cssmenu > ul > li.has-sub.active > a::after, #cssmenu > ul > li.has-sub:hover > a { border-top-color: #ffffff; } #cssmenu ul ul { position: absolute; left: -9999px; top: 60px; z-index: 9999; padding-top: 6px; font-size: 10px; opacity: 0; -webkit-transition: top 0.2s ease, opacity 0.2s ease-in; -moz-transition: top 0.2s ease, opacity 0.2s ease-in; -ms-transition: top 0.2s ease, opacity 0.2s ease-in; -o-transition: top 0.2s ease, opacity 0.2s ease-in; transition: top 0.2s ease, opacity 0.2s ease-in; } #cssmenu.align-right ul ul { text-align: right; } #cssmenu > ul > li > ul::after { content: ""; position: absolute; width: 0; height: 0; border: 5px solid transparent; border-bottom-color: #ffffff; top: -4px; left: 20px; } #cssmenu.align-right > ul > li > ul::after { left: auto; right: 20px; } #cssmenu ul ul ul::after { content: ""; position: absolute; width: 0; height: 0; border: 5px solid transparent; border-right-color: #ffffff; top: 11px; left: -4px; } #cssmenu.align-right ul ul ul::after { border-right-color: transparent; border-left-color: #ffffff; left: auto; right: -4px; } #cssmenu > ul > li > ul { top: 120px; } #cssmenu > ul > li:hover > ul { top: 49px; left: 0; opacity: 1; } #cssmenu.align-right > ul > li:hover > ul { left: auto; right: 0; } #cssmenu ul ul ul { padding-top: 0; padding-left: 6px; } #cssmenu.align-right ul ul ul { padding-right: 6px; } #cssmenu ul ul > li:hover > ul { left: 140px; top: 0; opacity: 1; } #cssmenu.align-right ul ul > li:hover > ul { left: auto; right: 100%; opacity: 1; } #cssmenu ul ul li a { text-decoration: none; font-weight: 400; padding: 11px 25px; width: 140px; color: #a19393; background: #ffffff; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 1px 1px 1px rgba(0, 0, 0, 0.1), -1px 1px 1px rgba(0, 0, 0, 0.1); } #cssmenu ul ul li:hover > a, #cssmenu ul ul li.active > a { color: #ffffff; } #cssmenu ul ul li:first-child > a { border-top-left-radius: 3px; border-top-right-radius: 3px; } #cssmenu ul ul li:last-child > a { border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; } #cssmenu > ul > li > ul::after { position: absolute; display: block; } #cssmenu ul ul li.has-sub > a::after { content: ""; position: absolute; width: 0; height: 0; border: 4px solid transparent; border-left-color: #a19393; right: 17px; top: 14px; top: 12.5px; } #cssmenu.align-right ul ul li.has-sub > a::after { border-left-color: transparent; border-right-color: #a19393; right: auto; left: 17px; } #cssmenu ul ul li.has-sub.active > a::after, #cssmenu ul ul li.has-sub:hover > a::after { border-left-color: #ffffff; } #cssmenu.align-right ul ul li.has-sub.active > a::after, #cssmenu.align-right ul ul li.has-sub:hover > a::after { border-right-color: #ffffff; border-left-color: transparent; } @media all and (max-width: 800px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1024px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min-resolution: 192dpi) and (max-width: 1024px), only screen and (min-resolution: 2dppx) and (max-width: 1024px) { #cssmenu { background: #ffffff; } #cssmenu > ul { display: none; } #cssmenu > ul.open { display: block; border-top: 1px solid rgba(0, 0, 0, 0.1); } #cssmenu.align-right > ul { float: none; } #cssmenu.align-center > ul { text-align: left; } #cssmenu > ul > li, #cssmenu.align-right > ul > li { float: none; display: block; } #cssmenu > ul > li > a { padding: 18px 25px 18px 25px; border-right: 0; } #cssmenu > ul > li:hover > a, #cssmenu > ul > li.active > a { background: rgba(0, 0, 0, 0.1); } #cssmenu #menu-button { display: block; text-decoration: none; font-size: 13px; font-weight: 700; color: #a19393; padding: 18px 25px 18px 25px; text-transform: uppercase; letter-spacing: 1px; background: url('bg.png'); cursor: pointer; } #cssmenu ul ul, #cssmenu ul li:hover > ul, #cssmenu > ul > li > ul, #cssmenu ul ul ul, #cssmenu ul ul li:hover > ul, #cssmenu.align-right ul ul, #cssmenu.align-right ul li:hover > ul, #cssmenu.align-right > ul > li > ul, #cssmenu.align-right ul ul ul, #cssmenu.align-right ul ul li:hover > ul { left: 0; right: auto; top: auto; opacity: 1; width: 100%; padding: 0; position: relative; text-align: left; } #cssmenu ul ul li { width: 100%; } #cssmenu ul ul li a { width: 100%; box-shadow: none; padding-left: 35px; } #cssmenu ul ul ul li a { padding-left: 45px; } #cssmenu ul ul li:first-child > a, #cssmenu ul ul li:last-child > a { border-radius: 0; } #cssmenu #menu-button::after { display: block; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; content: ''; position: absolute; height: 3px; width: 22px; border-top: 2px solid #a19393; border-bottom: 2px solid #a19393; right: 25px; top: 18px; } #cssmenu #menu-button::before { display: block; content: ''; position: absolute; height: 3px; width: 22px; border-top: 2px solid #a19393; right: 25px; top: 28px; } #cssmenu > ul > li.has-sub > a::after, #cssmenu ul ul li.has-sub > a::after { display: none; } } It generates into a drop-down menu that uses jQuery as part of the effects (simple fade drop-down); any help is greatly appreciated. Java is not my forte Hello everyone! I got this: <center><script type="text/javascript"> var imgs1 = new Array("http://img687.imageshack.us/img687/4438/kamslide3.jpg","http://img143.imageshack.us/img143/5968/kamslide2.jpg","http://img696.imageshack.us/img696/7066/kamslide1.jpg"); var alt1 = new Array(); var currentAd1 = 0; var imgCt1 = 3; function cycle1() { if (currentAd1 == imgCt1) { currentAd1 = 0; } var banner1 = document.getElementById('adBanner1'); var link1 = document.getElementById('adLink1'); banner1.src=imgs1[currentAd1] banner1.alt=alt1[currentAd1] currentAd1++; } window.setInterval("cycle1()",7000); </script> <img src="http://img687.imageshack.us/img687/4438/kamslide3.jpg" id="adBanner1" border="0" width="861" height="267" /></center> It looks like this: http://dolollies.blogspot.com How can I make the image fade?? I've been looking everywhere with no luck, so maybe someone here can help me. If you end up having to code it for me, I'll give you credit and put you in my blogroll. So it's really easy to find a random post widget that just shows a list of links, but that's not what I want. What I want is something that will show only one post at a time with an image and a text exerpt. I also only want it to show posts with the label "favorite products". If you look at my blog now (http://www.orangeraspberrylemonade.blogspot.com), you'll see that there's a section in the sidebar that shows a favorite product and a link to all the posts with that label, but I have to update it manually and therefore only one post is getting attention at any given time. Hi guys! This is the website -> http://toplistmovies.blogspot.com/. Im having trouble about the posts below the slides. In firefox i see this -> http://s16.postimage.org/v4nmny4ar/fasdfalsdjf.png In Chrome i see this -> http://s16.postimage.org/uges505kz/fasdfasdfasdf.png This is the code -> Code: <div class='Image thumb' style='overflow:hidden;'> <b:if cond='data:post.isFirstPost'> <script type='text/javascript'> //<![CDATA[ function bp_thumbnail_resize(image_url,post_title) { var default_thumbnail="http://3.bp.blogspot.com/-WxjumWhIM5E/TwKvb6jtXoI/AAAAAAAAEG0/hBQHJnIO5eE/s000/default.png"; if(image_url == "") image_url= default_thumbnail; var nova = image_url.replace('s72-c', 's400', image_url); image_tag='<img src="'+nova+'" style="width:260px;" alt="'+post_title+'"/>'; if(image_url!="") return image_tag; else return ""; } //]]> </script> </b:if> <a expr:href='data:post.url'><script> document.write(bp_thumbnail_resize("<data:post.thumbnailUrl/>","<data:post.title/>"));</script> </a> </div> <div class='information'> <div class='js-kit-rating' expr:path='data:post.url' expr:permalink='data:post.url' expr:title='data:post.title'> </div> </div> </div> <div class='postBoxMeta'> <div class='postDate'> <script type='text/javascript'> var timestamp = "<data:post.dateHeader/>"; if (timestamp != '') { var timesplit = timestamp.split(","); var date_yyyy = timesplit[2]; var timesplit = timesplit[1].split(" "); var data = timesplit[2]; var date_dd = data.replace("de", "", timesplit[2]); var date_mmm = timesplit[1].substring(0, 3); } </script> <span class='day'><script type='text/javascript'>document.write(date_dd);</script>Dia</span> <br/> <span class='month'><script type='text/javascript'>document.write(date_mmm);</script></span> </div> Hi all, I am using xmlhttp.open();xmlhttp.send(); to send a php content to a div. This php content is again using the same method to get php content from a further page. The content of the div, does not seem to be using the css and javascript files defined in the calling pages <head> section. Does anyone know why this is? Is there a workaround or solution to this problem? It might be easier to understand looking at the code, so Background info: Javascript file: scripts.js client.php ----> loads data from: display_client.php display_client.php ----> loads data from: display_brand.php Code: client.php http://pastebin.com/4EFn9YRf display_client.php http://pastebin.com/BGZAKre2 display_brand.php http://pastebin.com/0a4Pg3gg scripts.js http://pastebin.com/er4dkmPc Thanks! Ok, I would post my entire data here but then yall would be reading insane amounts of script. I've got a div content jquery slider on my site I am making and it works beautifully in all browsers(took me a while). Then, I decided why not have it where when people click on a "read more" link that it pops up a box, instead of directing to the new page, and displays the contents of a div. It would not work at all. My question is there a possible way to do this?
Hi guys, I am working with a plugin calld Hashslider which is a fairly simple div slider. Here is the code for startrs Code: // hashslider v0.9 by manuel huegel, copyright 2010 // mgoys.com $(document).ready(function(){ //get width and height of the wrapper and give it to the UL var wrapperwidth = $('#slider').width() * $('#slider ul > li').size(); $('#slider ul').css('width', wrapperwidth); var wrapperheight = $('#slider').height(); $('#slider ul').css('height', wrapperheight); //set my li width var width = $('#slider').width(); $('#slider ul li').css('width', width); //set my counter vars var counter = $('#slider ul > li').size(); var decount = 1; var autocount = 1; //create my number navigation var createNum = 1; $('#numbers li:first-child').html(createNum).addClass('activenum').attr('id', 'id1'); while ( createNum != counter) { $('#numbers li:last-child').after('<li> </li>'); createNum++; $('#numbers li:last-child').html(createNum); $('#numbers li:last-child').attr('id', 'id' + createNum); } //get my number-width (number navigation should always be centered) var numwidth = $('#numbers li:first-child').width() * $('#numbers li').size(); $('#numbers').css('width', numwidth); //slide the button to the next item function goNext() { if ( decount != counter) { $('#slider ul').animate({ left: '-=' + $('#slider').width() }, 400, 'swing', function() { }); $('.activenum').removeClass('activenum').next().addClass('activenum'); decount++; window.location.hash = decount; } } function goBack() { if ( decount != 1) { $('#slider ul').animate({ left: '+=' + $('#slider').width() }, 400, 'swing', function() { }); $('.activenum').removeClass('activenum').prev().addClass('activenum'); decount--; window.location.hash = decount; } } //make the number clickable $("#numbers li").click(function() { //$('#info4').html( $(this).html() ); var clickednum = $(this).html() * - $('#slider').width() + $('#slider').width(); //$('#info4').html( clickednum ); $('#slider ul').animate({ left: clickednum }, 400, 'swing', function() { }); $('.activenum').removeClass('activenum'); $(this).addClass('activenum'); decount = $(this).html(); window.location.hash = $(this).html(); }); //thaths the hash-shizzle if ( window.location.hash != '') { //get hash, scroll to position var hashnum = window.location.hash.substr(1) * - $('#slider').width() + $('#slider').width(); $('#slider ul').animate({ left: hashnum }, 0, function() { }); //set counters to position decount = window.location.hash.substr(1); $('.activenum').removeClass('activenum'); var hashname = window.location.hash.substr(1); $('#id' + hashname).addClass('activenum'); } //get my clickers $("#right").click(function() { goNext(); }); $("#left").click(function() { goBack(); }); //get mousewheel function $("#slider ul").mousewheel(function(event, delta) { if (delta > 0) { goBack(); event.stopPropagation();event.preventDefault(); } }); $("#slider ul").mousewheel(function(event, delta) { if (delta < 0) { goNext(); event.stopPropagation();event.preventDefault(); } }); }); As you will see the current code loops through all of the slides, and when it reaches the last (or first) the previous and next links become unclickable. I would like to go a stage further than this and make them dissapear entirely. I don't know how to do this or even to start, I dont even know what function to edit. Please help guys. Thanks in advance Dan Dear All, please i want to create content image rotator with thumbs image horizontal and starts automatically.you can understand more when you see http://maktoob.yahoo.com/?p=us many thanks for your efforts Hi For example I have a HTML table... Code: name | grade | action bob | 1.0 | [button class="button" id='1'] jack | 2.0 | [button class="button" id='2'] john | 3.0 | [button class="button" id='3'] When I click the button, to get the id... Code: $(function(){ $('.button').click(function() var buttonid = this.id }); }); so if I were to press buttonid 1 how do I get the grade '1.0' without having to open the database? I want to create several pages (they can be text or html) with basic informatons for css formatting. example: <div class="appname" name: this app <div class="appdetails"> Version: 1.0 Date: 1/1/2011 Description: this is an app </div> </div> I want to be able to save several of these and load them into a web page where they are formatted and displayed. This needs to be a client side solution so that I can be able to access this offline. Any suggestions? Edit: so far I have tried this but I am not sure about it. <object type="text/html" data="app1.html"> I have two effects, one is a fadein effect and one is a smooth scrolling effect. I also have a simple image slider but that isn't the problem. It doesn't seem like the fadein is the problem either because when I had non-scrolling (positioned absolute) content "fadein", it wouldn't fadein in IE but at least it showed up, whereas the main content is blocked in IE with a dialogue about not running scripts or activex. Is there a way to overwrite this? I tried running the basic example of smooth scrolling in IE9 and it worked fine without being blocked. My code seems the same! I would be ok with the content just not fading in when using IE9, but if a user doesn't know to enable activex scripts from the dialogue box (assuming they even get a dialogue box), they won't be able to read any of the content which is an issue. Here's the JavaScript in the head section: Code: <script type="text/javascript" src="jquery.js"></script> <script> function goToByScroll(id){ $('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');} </script> <link href="template.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="slider.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#slider").easySlider({ auto: true, continuous: true }); }); </script> <link href="slider2.css" rel="stylesheet" type="text/css" media="screen" /> <script> function fadein(){var fade=0,fadein=document.getElementById("fadein").style,ms=(fadein.opacity==0)?0:1,pace=setInterval(Fade,40);function Fade(){if(fade<100){fade+=2;if(ms)fadein.filter="alpha(opacity="+fade+")";else fadein.opacity=(fade/100)}else clearInterval(pace)}}; window.onload=fadein; </script> </head> What wrong in this code? Code: <script type="text/javascript" src="jquery.js"></script> <script> $(function (){ function manda(){ var text = $('#frame').contents().find('p[class=no_boder]').html(); $('div').html(text); } }); </script> i've already tried using this -> $('#frame').contents().html(); How can i get the content? Hi, Well this plugin stops working after completely loading the flash content or game. I did a few changes to it but still, it won't show the game after completely loading the flash. Can someone tell me what's wrong? Here is the link to live working example http://files.cryoffalcon.com/Piecema...s/testing.html Hello there, I'm an IT student that recently started to learn JavaScript. I'm trying to write a code that starts with a prompt inputs a number like n. Then the code will ask another n prompts for data input. For example I will input 5 for first prompt, code will ask for 5 more prompts for input. Can't figure out how to do it
|