SHARE
TWEET

Untitled

a guest May 1st, 2015 222 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         jQuery(document).ready(function () {
  2.             ! function ($) {
  3.                 //prevents js conflicts
  4.                 "use strict";
  5.                 var my_item_order = ["title","image","text","button"];
  6.                 $('.widget-front' , '#main-wrapper .marketing' ).each( function() {
  7.                     var o            = [];
  8.                     o['title']   = $(this).find('h2');
  9.                     o['image']   = $(this).find('.thumb-wrapper');
  10.                     o['text']    = $(this).find('p');
  11.                     o['button']  = $(this).find('a.btn');
  12.                     for (var i = 0; i < my_item_order.length - 1; i++) {
  13.                        o[my_item_order[i]].after(o[my_item_order[i+1]]);
  14.                     };
  15.                 });
  16.             }(window.jQuery)
  17.         });
  18.     </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top