Solved

change to jquery effect

Posted on 2013-06-05
6
451 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

738 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