- This topic is empty.
August 14, 2011 at 11:53 am #33905Ash149Participant
So i’m trying to write my first bit of jQuery to do something on a site and I’m sure I could probably copy some code to do it but I want to do it myself, I’ve been watching lots of jQuery tutorials (just watching the first one on here that Chris did) and basically I can’t seem to get my coding working correctly.
Here is the code I’ve written:
That’s exactly how it is in my header section on the site. Basically trying to get it to change the ‘top’ of the media-bar, here is the HTML:
This is the media bar
This is another line.
This is yet another line of text.
The CSS for the media bar is as follows:
It’s basically hidden from the page. If I change the #media-bar ‘top’ to 0px it displays where I want it to once you have clicked the ‘start here’ div. If you get what I mean. I can’t see why it shouldn’t be working?
Thanks a lot if anyone can help!
AshAugust 14, 2011 at 3:40 pm #84993Ash149Participant
Thanks fourize, the code you supplied worked fine, I used to it add a top value to the start-here DIV to move that down 200px.
Though the only way I could get it working properly was to use the mouseover the header and page-wrap so put it back away, but that’s ok for now, I’m gonna watch some more tutorials/read up on jQuery as I need to be able to do this kinda stuff properly, but for now my code will work ok, this is what the jQuery ended up being like:
So for now that will have to suffice :)