Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

change to jquery effect

Posted on 2013-06-05
6
Medium Priority
?
463 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

688 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