Solved

problem with jquery dom.

Posted on 2014-10-16
5
28 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
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…

776 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