Moving elements around with jQuery

Moving elements around with jQuery

WordPress paging line is under ‘related sites’, not right below the article contents. To move it up with two steps:

  • Wrap the line right below the article, in this example is “page view counter“, “pvc_stats” class.
  • Prepend paging element “.page-links” to the wrapper.

See the code below:

$(document).ready(function(){
  $('.pvc_stats').wrap('<div class="page-link-wrapper"></div>');
  $('.page-links').prependTo($('.page-link-wrapper'));
});

move-paging-line-up

56 total views, 2 views today

Author: Albert

Leave a Reply