Moving Content Blocks with jQuery?

Was using this code (in the site wide code injection) to try to move a footer code/content block up below the header of my blog to use as a faux navagation bar to go through the categories of my blog:

<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script type"text/javascript">
  $(function() {
  $("#block-eb7179ed963838e9b893") .prependTo("#content");
});
</script>

Tried several different things with no avail. I also have it set it up as its own div in the code block incase I need to reference it differently.

I know my CSS to keep the block from showing up in other pages works:

.collection-type-page #block-eb7179ed963838e9b893, 
.collection-type-index #block-eb7179ed963838e9b893,
.collection-type-gallery #block-eb7179ed963838e9b893 {
  display: none;  
}

Thoughts? Help? Suggestions? I beg of you!

Here is where I want the stuff to go: alt text

asked Jan 02 at 22:41 by beccawatkins_ 113

your script also has a space before .prependTo

(Mar 31 at 03:52) tazmeah tazmeah's gravatar image

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#content").prepend("#block-eb7179ed963838e9b893");
});
</script>

answered Mar 31 at 03:51 by tazmeah 5296

link
Your Answer
toggle preview

Follow This Question

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×559
×337
×84
×39
×34

Asked: Jan 02 at 22:41

Seen: 847 times

Last updated: Mar 31 at 03:52

Established 2004 Handmade in NYC