Solved

change to jquery effect

Posted on 2013-06-05
6
413 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
  • 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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 improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now