• bryananthonylewis

    (@bryananthonylewis)


    I’m having an JavaScript Issue. IF you visit this page… http://bvh.delineamultimedia.com/?page_id=2 and click on the first image.

    There is a plugin “Royal Slider” which is working fine in the dropdown of the first image but there is also a slider on the 2nd image which isn’t showing up. If you look at the markup you will see the 2nd gallery and its not showing on the front end.

    I’m trying to use the following code to state, “if” there is a gallery show it “else” show the static image. If I take off the ID the gallery doesn’t show at all.

    I’m in need of a javascript expert for a bit of help. I’m more than happy to speak further if this doesn’t make sense quite yet.

    The entire JS page isn’t too long and is located here. http://bvh.delineamultimedia.com/wp-content/themes/bvh/js/portfolio/superbox.js

    //royal slider fix
    if(currentimg.siblings('.royalSlider').length > 0){
    	window.sliderData = currentimg.siblings('.royalSlider');
    }
    
    if ($(e.target).attr('id') == '150') { // show the slider if there is one
    	superbox.append(window.sliderData);
    	superboximg.css('display', 'none');
    } else { // if there is no slider proceed as before
    	if (imgData.img) {
    		superboximg.attr('src', imgData.img);
    		superboximg.css('display', 'block');
    	}
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Hide/Show issue with javascript.’ is closed to new replies.