troubleshooting Question

jquery replace div with a div

Avatar of gabos
gabos asked on
Web Languages and StandardsWeb DevelopmentScripting Languages
8 Comments3 Solutions1965 ViewsLast Modified:
I'm developing a site. I want to replace a div, with another div, once a menu item is clicked. I'm using jquery for this part. This is what I have so far:

		<link rel="stylesheet" type="text/css" href="css/sitetemplate.css" />
		<title>Orbital Wealth</title>
		<script type="text/javascript" src="scripts/jquery.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {     
					var content = $(this).html();         
		<div id="pagebackground">
		<div id="headerbar">
			Orbital Wealth
		<div id="owmenu">
			<ul id="owmenulist">
				<a href="#" class="aboutusclick"><li>About Us </li></a>
				<a href="#"><li>Mission Statement </li></a>
				<a href="#"><li>Company Relations </li></a>
				<a href="#"><li>Contact Us </li></a>
				<a href="#"><li>Company Blog</li></a>
		<div id="footer">
		<div id="aboutus">

This is the css file:
body {
	background-color: black;

#pagebackground {
	height: 800px;
	width: 853px;
	color: #7B6CB5;

	/* background-image: url("../images/orbitalbackground.jpg");
	background-repeat: no-repeat; 
	Centering the pagebackground div */	
	position: relative;
	top: 150px;
	left: 300px;

#headerbar {
	font-size: 75px;
	color: #7B6CB5;
	position: absolute;
	top: 50px;
	left: 300px;

#owmenu {
	position: absolute;
	left: 50px;
	top: 150px;
	font-size: 25px;

/* Menu items effects */
#owmenulist {
	list-style-type: none;
	text-decoration: none;
#owmenulist a {
	text-decoration: none;
	color: #7b6cb5

#owmenulist a:hover {
	color: #ccc;

#aboutus {
	color: blue;
	visibility: hidden;

I basically want the content of pagebackground to be replaced with the content of aboutus. Does anyone have any suggestions?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros