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
Solved

change to jquery effect

Posted on 2013-06-05
6
439 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 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