Solved

change to jquery effect

Posted on 2013-06-05
6
456 Views
Last Modified: 2013-07-26
I downloaded a jquery template effect and I'm trying to make one change to it and can't get it to work. There are 3 buttons and links that appear when you roll over the buttons which are called Subitem. Instead of links I just want a small paragraph. Everytime I put in the paragraph and there is either a lot of space at the bottom or it scolls off the page. It seems to need the ul and li and links. Below is the sample.

<ul>                                                
<li><a href="#">Subitem</a></li>
<li><a href="#">Subitem</a></li>                              
<li><a href="#">Subitem</a></li>                                    
</ul>
Sliding0plain.zip
SlidingBackgroundImageMenu.zip
0
Comment
Question by:designaire
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 11

Expert Comment

by:mcnute
ID: 39225286
Have you tried to just do it like this:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Sliding Background Image Menu with jQuery</title>
		<meta charset="UTF-8" />
        <meta name="description" content="Sliding Background Image Menu with jQuery" />
        <meta name="keywords" content="jquery, background image, image, menu, navigation, panels" />
		<meta name="author" content="Codrops" />
        <link rel="stylesheet" type="text/css" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/sbimenu.css" />
		<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow' rel='stylesheet' type='text/css' />
		<link href='http://fonts.googleapis.com/css?family=News+Cycle&v1' rel='stylesheet' type='text/css' />

    </head>
    <body>
		<div class="container">
	<!--    <div class="header">
		
		
			</div>-->
			<div class="content">
             <div class="sbi_container width lightRed"></div>
				<div id="sbi_container" class="sbi_container">
					<div class="sbi_panel" data-bg="images/1.jpg">
						<a href="#" class="sbi_label">test</a>
						<div class="sbi_content">
							<p>
							    Small paragraph 1
							</p>
						</div>
					</div>
					<div class="sbi_panel" data-bg="images/2.jpg">
						<a href="#" class="sbi_label">test</a>
						<div class="sbi_content">
							<p>
							    Small paragraph 2
							</p>
						</div>
					</div>
					<div class="sbi_panel" data-bg="images/3.jpg">
						<a href="#" class="sbi_label">test</a>
						<div class="sbi_content">
							<p>
							    Small paragraph 3
							</p>
						</div>
					</div>
			  </div>
			</div>
			<div class="more"> </div>
		</div>
        
        <div class="sbi_container width bottomPiece"> <img src="images/video.png" width="875" height="460" alt="video"></div>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
		<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
		<script type="text/javascript" src="js/jquery.bgImageMenu.js"></script>
		;
 
    <script type="text/javascript">
			$(function() {
				$('#sbi_container').bgImageMenu({
					defaultBg	: 'images/default.jpg',
					border		: 1,
					type		: {
						mode		: 'seqHorizontalSlide',
						speed		: 250,
						easing		: 'jswing',
						seqfactor	: 100
					}
				});
			});
		</script>
    </body>
</html>

Open in new window


The .sbi_content div is the one to be animated, just put your paragraph there.
0
 

Author Comment

by:designaire
ID: 39225554
Nice try, I didn't think of that but it still scolls way up for some reason. You can't seem to put more than one or two lines of copy. Maybe it's a lightheight or something somewhere in the jquery but I haven't seem to be able to find it.

maybe this somehow?

$content            = $el.find('div.sbi_content'),
0
 
LVL 11

Expert Comment

by:mcnute
ID: 39248143
Oh sorry. some errors in my code. It is the sbi_container div that is animated. I tested it locally and it doesn't scroll up. Here is the cleaned up code:

 
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Sliding Background Image Menu with jQuery</title>
		<meta charset="UTF-8" />
        <meta name="description" content="Sliding Background Image Menu with jQuery" />
        <meta name="keywords" content="jquery, background image, image, menu, navigation, panels" />
		<meta name="author" content="Codrops" />
        <link rel="stylesheet" type="text/css" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/sbimenu.css" />
		<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow' rel='stylesheet' type='text/css' />
		<link href='http://fonts.googleapis.com/css?family=News+Cycle&v1' rel='stylesheet' type='text/css' />

    </head>
    <body>
		<div class="container">
	<!--    <div class="header">
		
		
			</div>-->
			<div class="content">
             <div class="sbi_container width lightRed"></div>
				<div id="sbi_container" class="sbi_container">
					<div class="sbi_panel" data-bg="images/1.jpg">
						<a href="#" class="sbi_label">test</a>
						<div class="sbi_content">
							<p>
							    Small paragraph 1
							</p>
						</div>
					</div>
					<div class="sbi_panel" data-bg="images/2.jpg">
						<a href="#" class="sbi_label">test</a>
						<div class="sbi_content">
							<p>
							    Small paragraph 2
							</p>
						</div>
					</div>
					<div class="sbi_panel" data-bg="images/3.jpg">
						<a href="#" class="sbi_label">test</a>
						<div class="sbi_content">
							<p>
							    Small paragraph 3
							</p>
						</div>
					</div>
			  </div>
			</div>
			<div class="more"> </div>
		</div>
        
        <div class="sbi_container width bottomPiece"> <img src="images/video.png" width="875" height="460" alt="video"></div>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
		<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
		<script type="text/javascript" src="js/jquery.bgImageMenu.js"></script>
    <script type="text/javascript">
			$(function() {
				$('#sbi_container').bgImageMenu({
					defaultBg	: 'images/default.jpg',
					border		: 1,
					type		: {
						mode		: 'seqHorizontalSlide',
						speed		: 250,
						easing		: 'jswing',
						seqfactor	: 100
					}
				});
			});
		</script>
    </body>
</html>

Open in new window

0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

Author Comment

by:designaire
ID: 39302684
sorry, I'll check that soon. I've moved on but want to see if this works without it scrolling up.
0
 

Accepted Solution

by:
designaire earned 0 total points
ID: 39343045
It doesn't work when you put more than one line of copy. I ended up not using this design. Thanks for your help anyway.
0
 

Author Closing Comment

by:designaire
ID: 39357266
I ended up doing something different.
0

Featured Post

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question