Posted By

krunkosaurus on 12/29/08


Tagged

javascript kickapps


Versions (?)

Move modules around on your KickApps powered site


 / Published in: JavaScript
 

In this example below I am moving the "recent blogs" module in "My Home" to the very top. I have placed this code in the footer of my Affiliate Center wrapped in script tags.

For maximum efficiency: 1) Use the inspect tool in Firebug to find the main container you want to move (the element that's wrapping around the content you want to move).

2) Find the ID of the element you want to insert into, after, or before.

3) Write your code like below. Instead of using .insertBefore, you can use any of the options on this page under "insert outside" and "insert inside": http://docs.jquery.com/Manipulation#bodyContent

4) Don't forget to wrap your code around an if statement to target the specific page(s) only so that your code doesn't run on your other KickApps pages.

-- For more tips and tricks checkout the KickApps resources page.

  1. // move "blogs module" to top of page when on "My Home"
  2. if (Ka.Info.PAGE === "pages/myPlace.jsp"){
  3. //move Most Recent Blog Posts to the top
  4. $j('#ka_newBlog').insertBefore('#ka_getActive');
  5. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: krunkosaurus on December 29, 2008

More KickApps tips and tricks try looking for the kickapps tag.

You need to login to post a comment.