?
Solved

problem with jquery dom.

Posted on 2014-10-16
5
Medium Priority
?
42 Views
Last Modified: 2016-05-09
Hi guys.

Please have a look at the 2 links. The one "works" works like a champ. But "Fail" dosent work. Only difference is, that i load the content from javascript in the "fail" document.

I must be missing something, does anybody have a solution?


http://www.dandodesign.dk/test/fail.html
http://www.dandodesign.dk/test/works.html
0
Comment
Question by:bongii
[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
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40384563
Both links work for me.
0
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 40384573
Oh I see what you mean, rearrange your js

$(function () {
 str = '<ul>' +
 		'<li><div class="red"></div></li>' +
		'<li><div class="blue"></div></li>' +
		'<li><div class="red"></div></li>' +
		'<li><div class="blue"></div></li>' +
		'<li><div class="red"></div></li>' +
		'<li><div class="blue"></div></li>' +
		'</ul>';
$(".RaptorContainer").html(str);
 
  $('.RaptorContainer').scrollbox({
	autoPlay: false,
    direction: 'h',
    distance: 134
  });
  $('#RaptorBackward').click(function () {
    $('.RaptorContainer').trigger('backward');
  });
  $('#RaptorForward').click(function () {
    $('.RaptorContainer').trigger('forward');
  });
 });

Open in new window

0
 

Author Comment

by:bongii
ID: 40384583
THANKS :)))
0

Featured Post

Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

801 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