Solved

Jquery Include?

Posted on 2014-09-19
4
247 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
[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
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40333309
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
ID: 40333313
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
ID: 40333314
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
ID: 40333430
Excellent; thanks so much!

I have another one on this same page shortly.

Thanks!
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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…

695 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