Search Results

Search found 8 results on 1 pages for 'hollyb'.

Page 1/1 | 1 

  • Galleria jQuery plugin briefly shows all images in IE 7 & 8

    - by hollyb
    I'm using the galleria jQuery plugin on a site. When the gallery first loads, all of the images appear briefly & vertically in ie 7 & 8. This doesn't happen when i isolate the gallery, only when i put it on a somewhat heavy page. This leads me to believe that it happens when the page is a little slow to load. Does anybody know a way to fix this? I feel like an overflow: hidden should fix this, but I've applied it along with a height in every container I could think of. Anybody have any ideas? Here is my css: .galleria{list-style:none;width:350px; overflow:hidden; height: 70px;} .galleria li{display:block;width:50px;height:50px;overflow:hidden;float:left;margin:4px 10px 20px 0;} .galleria li a{display:none;} .galleria li div{position:absolute;display:none;top:0;left:180px;} .galleria li div img{cursor:pointer;} .galleria li.active div img,.galleria li.active div{display:block;} .galleria li img.thumb{cursor:pointer;top:auto;left:auto;display:block;width:auto;height:auto} .galleria li .caption{display: inline;padding-top:.5em; width: 300px; } * html .galleria li div span{width:350px;} /* MSIE bug */ html: <ul class="gallery"> <li class="active"><img src="1.jpg" cap="A great veiw by so and so. This is a long block of info.<br /><span style=color:#666;>Photo by: Billy D. Williams</span>" alt="Image01"></li> <li><img src="2.jpg" cap="A mountain <span style=color:#666;>Photo by: Billy D. Williams</span>" alt="Image01"></li> <li><img src="3.jpg" cap="Another witty caption <span style=color:#666;>Photo by: Billy D. Williams</span>" alt="Image01"></li> <li><img src="4.jpg" cap="<span style=color:#666;>Photo by: Billy D. Williams</span>" alt="Image01"></li> </ul>

    Read the article

  • Building static nav in concrete5

    - by hollyb
    I've inherited a site built with the CMS concrete5. I'm just starting to dissect it but was hit with a wicked short deadline on a complete overhaul to the nav. So, I want to build out a static nav and then go back when I have more time and integrate it with the auto-nav. Does anybody have experience working with concrete5? If so: Where would I drop my custom static nav? Is it possible to select it from the admin (so that the current one is still available if the client wants to switch back via the admin)? Thanks!

    Read the article

  • Getting jQuery slideshow animation to stop on click

    - by hollyb
    I have a slide show built with jQuery that pauses on hover. It has a group of thumbnails sitting on top of the image that advances the image when clicked, otherwise the slideshow just auto-rotates through all the images. There is also a +/- to expand and contract a caption related to each image. I want to have the slideshow's automatic advancing to stop if one of the thumbnails is clicked, or the +/-. Basically, just stop whenever a user clicks anywhere within the gallery (div class=".homeImg"). I'm having a major brain fart in getting this working properly and could use some advice. Here's the jQuery: $(document).ready(function() { $(".main_image .desc").show(); //Show image info $(".main_image .block").animate({ opacity: 0.85 }, 1 ); //Set Opacity //Click and Hover events for thumbnail list $(".image_thumb ul li:first").addClass('active'); // * Adds a class 'last' to the last li to let the rotator know when to return to the first $(".image_thumb ul li:last").addClass('last'); $(".image_thumb ul li").click(function(){ //Set Variables var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image var imgTitle = $(this).find('a').attr("href"); //Get Main Image URL var imgDesc = $(this).find('.block').html(); //Get HTML of block var imgDescHeight = $(".main_image").find('.block').height(); //Calculate height of block if ($(this).is(".active")) { //If it's already active, then… return false; // Don't click through } else { //Animate $(".main_image img").animate({ opacity: 0}, 800 ); $(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 800, function() { $(".main_image .block").html(imgDesc).animate({ opacity: 0.85, marginBottom: "0" }, 250 ); $(".main_image img").attr({ src: imgTitle , alt: imgAlt}).animate({ opacity: 1}, 250 ); }); } $(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all lists $(this).addClass('active'); //add class of 'active' on this list only return false; }) .hover(function(){ $(this).addClass('hover'); }, function() { $(this).removeClass('hover'); }); //Toggle teaser $("a.collapse").click(function(){ $(".main_image .block").slideToggle(); $("a.collapse").toggleClass("show"); return false; // added to remove # browser jump }); // If we are hovering over the image area, pause the clickNext function pauseClickNext = false; $(".homeImg").hover( function () { pauseClickNext = true; }, function () { pauseClickNext = false; } ); // Define function to click the next li var clickNext = function(){ if(!pauseClickNext) { /// find the next li after .active var $next_li = $("li.active").next("li"); if($("li.active").hasClass("last") ){ $(".image_thumb ul li:first").trigger("click"); } else { $next_li.trigger("click"); } } }; // Time between image transition setInterval(clickNext, 6000); });

    Read the article

  • Adding jQuery event handler to expand div when a link is clicked

    - by hollyb
    I'm using a bit of jQuery to expand/hide some divs. I need to add an event handler so that when a link is clicked, it opens a corrisponding div. Each toggled div will have a unique class assigned to it. I am looking for some advice about how to build the event handler. The jQuery $(document).ready(function(){ $(".toggle_container:not(:first)").hide(); $(".toggle_container:first").show(); $("h6.trigger:first").addClass("active"); $("h6.trigger").click(function(){ $(this).toggleClass("active"); $(this).next(".toggle_container").slideToggle(300); }); The css: // uses a background image with an on (+) and off (-) state stacked on top of each other h6.trigger { background: url(buttonBG.gif) no-repeat;height: 46px;line-height: 46px;width: 300px;font-size: 2em;font-weight: normal;} h6.trigger a {color: #fff;text-decoration: none; display: block;} h6.active {background-position: left bottom;} .toggle_container { overflow: hidden; } .toggle_container .block {padding: 20px;} The html has a list of links, such as: <a href="#">One</a> <a href="#">Two</a> and the coorisponding divs to open: <h6 class="trigger">Container one</h6> <div class="toggle_container"> div one </div> <h6 class="trigger">Container two</h6> <div class="toggle_container Open"> div one </div> As I mentioned, I will be assigning a unique class to facilitate this. Any advice? Thanks! To clarify, i'm looking for some advice to build an event handler to toggle open a specific div when a link is clicked from a different part of the page, from a nav for instance.

    Read the article

  • Conflict between some JavaScript and jQuery on same page

    - by hollyb
    I am using a JavaScript function and some jQuery to perform two actions on a page. The first is a simple JS function to hide/show divs and change the active state of a tab: This is the JS that show/hides divs and changes the active state on some tabs: var ids=new Array('section1','section2','section3'); function switchid(id, el){ hideallids(); showdiv(id); var li = el.parentNode.parentNode.childNodes[0]; while (li) { if (!li.tagName || li.tagName.toLowerCase() != "li") li = li.nextSibling; // skip the text node if (li) { li.className = ""; li = li.nextSibling; } } el.parentNode.className = "active"; } function hideallids(){ //loop through the array and hide each element by id for (var i=0;i<ids.length;i++){ hidediv(ids[i]); } } function hidediv(id) { //safe function to hide an element with a specified id document.getElementById(id).style.display = 'none'; } function showdiv(id) { //safe function to show an element with a specified id document.getElementById(id).style.display = 'block'; } The html: <ul> <li class="active"><a onclick="switchid('section1', this);return false;">ONE</a></li> <li><a onclick="switchid('section2', this);return false;">TWO</a></li> <li><a onclick="switchid('section3', this);return false;">THREE</a></li> </ul> <div id="section1" style="display:block;">TEST</div> <div id="section2" style="display:none;">TEST 2</div> <div id="section3" style="display:none;">TEST 3</div> Now the problem.... I've added the jQuery image gallery called galleria to one of the tabs. The gallery works great when it resides in the div that is intially set to display:block. However, when it is in one of the divs that is set to display: none; part of the gallery doesn't work when the div is toggled to be visible. Specifically, the following css ceases to be written (this is created by galleria jQuery): element.style { display:block; height:50px; margin-left:-17px; width:auto; } For the life of me, I can't figure out why the gallery fails when it's div is set to display: none. Since this declaration is overwritten when a tab is clicked (via the Javascript functions above), why would this cause a problem? As I mentioned, it works perfectly when it lives the in display: block; div. Any ideas? I don't expect anybody to be familiar with the jQuery galleria image gallery... but perhaps an idea of how one might repair this problem? Thanks!

    Read the article

  • Looking for jQuery slideshow where a user can hide/show a block of text (link, caption)

    - by hollyb
    I'm looking to implement a fairly basic jQuery slideshow. One that automatically loops through a set number of images. The snag I'm running into is i'd like to have a little icon in the corner of the picture, that when clicked, brings up a transparent black bar across the bottom with some text and perhaps a link. Has anybody come across anything like this? This gallery is close, but lacks user control for showing/hiding the caption (and might be somewhat restrictive of what text can be used): http://www.queness.com/resources/html/slideshow/jquery-slideshow.html Anyway, if anybody has any tips or links that would be great. Thanks.

    Read the article

  • jQuery toggling divs, expand collapse all and keep first item selected when page loads

    - by hollyb
    Hi, I have a question about some functionality I'm trying to add to my jQuery to enable a button or text to expand/contract all the divs on click... and I'd like to figure out how to keep the first div open when the page loads. Here is the jQuery: (document).ready(function(){ //Hides containers on load $(".toggle_container").hide(); //Switch "Open" and "Close" state on click $("h2.trigger").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClass("active"); }); //Slide up and down on click $("h2.trigger").click(function(){ $(this).next(".toggle_container").slideToggle("slow"); }); }); And the css: // uses a background image with an on (+) and off (-) state stacked on top of each other h2.trigger { background: url(buttonBG.gif) no-repeat;height: 46px;line-height: 46px;width: 300px;font-size: 2em;font-weight: normal;} h2.trigger a {color: #fff;text-decoration: none; display: block;} h2.active {background-position: left bottom;} .toggle_container { overflow: hidden; } .toggle_container .block {padding: 20px;} And the html <h2 class="trigger"><a href="#">Heading</a></h2> <div class="toggle_container"> <div class="block">Stuff goes here</div> </div> <h2 class="trigger"><a href="#">Heading 2</a></h2> <div class="toggle_container"> <div class="block">Stuff goes here</div> </div> So it works great and looks great. However, when I try to get it to keep the first instance open, the background image that should adjust show the (-) state doesn't change. The code I used to this was: $(".toggle_container:first").show(); So, my question is, does anyone know of an easier way to show the first instance of this as open without having to created specials rules/class for the first item? Also, any ideas about how to make an open all/close all link? Thanks!

    Read the article

  • Linking to a section of a site that is hidden by a hide/show JavaScript function

    - by hollyb
    I am using a bit of JavaScript to show/hide sections of a site when a tab is clicked. I'm trying to figure out if there is a way I can link back to the page and have a certain tab open based on that link. Here is the JS: var ids=new Array('section1','section2','section3','section4'); function switchid(id, el){ hideallids(); showdiv(id); var li = el.parentNode.parentNode.childNodes[0]; while (li) { if (!li.tagName || li.tagName.toLowerCase() != "li") li = li.nextSibling; // skip the text node if (li) { li.className = ""; li = li.nextSibling; } } el.parentNode.className = "active"; } function hideallids(){ //loop through the array and hide each element by id for (var i=0;i<ids.length;i++){ hidediv(ids[i]); } } function hidediv(id) { //safe function to hide an element with a specified id document.getElementById(id).style.display = 'none'; } function showdiv(id) { //safe function to show an element with a specified id document.getElementById(id).style.display = 'block'; } And the HTML <ul> <li class="active"><a onclick="switchid('section1', this);return false;">One</a></li> <li><a onclick="switchid('section2', this);return false;">Two</a></li> <li><a onclick="switchid('section3', this);return false;">Three</a></li> <li><a onclick="switchid('section4', this);return false;">Four</a></li> </ul> <div id="section1" style="display:block;"> <div id="section2" style="display:none;"> <div id="section3" style="display:none;"> <div id="section4" style="display:none;"> I haven't been able to come up with a way to link back to a specific section. Is it even possible with this method? Thanks!

    Read the article

1