Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can I use this module to load node into defined div on front page? (dynamic ajax frontpage)
Or is there any other way?
Comments
Comment #1
nedjoThis module doesn't do loading on its own. Rather, it is a helper module for other modules that do loading. It loads needed CSS and Javascript.
Comment #3
jenlamptonI'd also like to use this module to load a node (and all of it's associated CSS/JS). The example module shows how to submit a form using this method but not how to load a node.
My use case is that I am using the jquery menu module to build a menu in my left sidebar. I then have a custom module that loads each node in the content area when the corresponding menu item in the sidebar is clicked. Unfortunately the css and javascript is not added to the page, and the behaviors are not attached.
My javascript code looks like this:
As you can see, I've tried attaching the behaviors in three different places, but to no avail.
I'd like to rework this code to use jquery load, but I can't see how to from the example module provided.
Update: I've decided to go with the Ajax Links API module instead, since that one worked right away for me, but I'd still be curious about the answer to this one :)