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
Solved

problem with jquery dom.

Posted on 2014-10-16
5
31 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
  • 2
5 Comments
 
LVL 58

Expert Comment

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

Accepted Solution

by:
Gary earned 500 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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…

856 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