I'm trying to load a page node with cck tabs into a container div, using ajax.
I've got the page loaded, but the cck tabs disappear, I have no idea what is causing this.

I'm using an ajax script I found online, tried a couple both with the same result.

http://idanarbel.com/websites/shooky/%D7%AA%D7%A4%D7%A7%D7%99%D7%93%D7%9...

if you click on the center image of the man with the horn, it will load a page below (very rough at the moment).

I'm loading this page:

http://idanarbel.com/websites/shooky/node/130

which you can see has the tabs.

Idan

Comments

arbel’s picture

tried it again using lightbox2 following a guide here:
http://www.erikhedin.com/web-design/drupal-tips/Easy-Ajax-Nodes-Lightbox...

but still on this page: http://idanarbel.com/websites/shooky/%D7%AA%D7%A4%D7%A7%D7%99%D7%93%D7%9...

if you click on the test ajax link. the tabs arn't loaded.

thanks

Idan

nedjo’s picture

Category: bug » support
Priority: Critical » Normal

Suggestions:

1. Ensure you're loading any additional JS and CSS along with the new page.
2. Ensure you're calling Drupal.attachBehaviors() after rendering the ajax-loaded content.

arbel’s picture

hi,

thanks for the help, I made sure all the js and css are there, and added the Drupal.attachBehaviors() but still no tabs.

I'm following this guide: http://www.erikhedin.com/web-design/drupal-tips/Easy-Ajax-Nodes-Lightbox... using lightbox2.

this is the code i'm using:

 <a href="/websites/shooky/node/130/lightbox2"  class="ajaxme">test ajax</a>
          <script type="text/javascript">
$(document).ready(function(){
 	$("a.ajaxme").click(function(){

	var AjaxSRC = $(this).attr("href");
	//grabs the href location of the click link;
	
	$("#ajaxtarget").empty().load(AjaxSRC + " #ajaxme");
	//empties the div and loads in the content;
	$("#ajaxtarget").ready(Drupal.attachBehaviors);
	return false;
	//stops the link action form changing the page
	
	});

});
</script>          <div id="ajaxtarget"></div>

the section of the page loads, but the tabs and tab content is missing.

i'd appreciate any help. Thanks.