Solved

Jquery Include?

Posted on 2014-09-19
4
224 Views
Last Modified: 2014-09-19
Please look at http://rkassoc.org/Davis/index9.htm. The solid blue background area in the center, right is supposed to have a menu in it.

See attached files; index9.htm and b.html.

Based on info I researched on the web, the Jquery
$(function(){
      $("#includedContent").load("b.html");
    });
is supposed to load b.html into the specified location; of course, there is nothing there.

What's wrong? Do I somehow have to force execution of that Jquery with a body "onLoad" function?

Note I only tried this in FireFox, not Chrome or other.

Thanks
index9.htm
b.html
0
Comment
Question by:Richard Korts
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
Comment Utility
remove your current script and use this one (check line 14) :
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
    $('.flexslider').flexslider({
        animation: "fade",
        controlNav: "thumbnails",
        slideshow: true,
		slideshowSpeed: 6000,           
        animationLoop: true
    });
    $('.flexslider ol img').click(function() {
        $('.flexslider').flexslider("play");
    });
	$('<div id="white-transparent"><div class="inside-white-semi-transparent" style="width: 67%; font-size: 19px; color: #4D4B4B; font-family: \'Univers Pro 55 Roman\'; padding-top: 30px; padding-left: 12px; line-height: 135%;"><span class="black-text">Welcome to Oklahoma\'s leading wholesale distributor</br> for irrigation, pumps, landscape, pool and outdoor living. products. For over three decades, family-owned  Davis Pipe and Supply has supported professional contractors with in-stock availability, technical support and knowledgable personnel. <span class="blue-text" style="color: #283781;font-family: Memphis Bold;"><b>Experience the Davis Difference!</b></span></span></div></div><div id=\'blue-solid\'><div id="includedContent"></div></div>').insertAfter(".flexslider .slides");
     $("#includedContent").load("b.html");  // once we add the div in the page, we can load the content (b.html) inside no before

});
</script>

Open in new window

0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
You're calling the load before the element exists - which you are dynamically loading later in the page.
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
a bit of CSS, if that can help :
<style>
#includedContent {
position: absolute;
top: -236px;
left: -75px;
}
</style>

Open in new window

0
 

Author Closing Comment

by:Richard Korts
Comment Utility
Excellent; thanks so much!

I have another one on this same page shortly.

Thanks!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

9 Experts available now in Live!

Get 1:1 Help Now