No Prescription Tramadol No Prescription

January 23rd, 2009

No prescription tramadol no prescription, Network bars are making the rounds on a lot of sites. If you aren't familiar with the term, it is usually a bar at the top of a site with links to other sites that are in the same network. Brandon, one of my friends, has a network bar on Open Soul that has links to his two other co-workers and to a few products and services they provide, What Is Tramadol Used For. Another great example is all of the sites created by Sidebar, such as My Mile Marker, Overheard.it, and Django Pluggables. Ultram And Urine Screens, Not too long ago, I created my second tips site, BlawgTips. I wanted to drive traffic back and forth between BlawgTips and RailsTips, so I created a network bar that sits at the top of each of those, no prescription tramadol no prescription. I was shocked at how easy it was. I only wanted it to be one request, so I included the styles inline in a style tag instead of calling another external stylesheet, Tramadol Caps 50mg. Below is the code.

jQuery(document).ready(function($) {
var styles = '<style type="text/css">' +
"#network_bar {float:left; display:inline; width:100%; margin:0; padding:0; background:#222; color:#ccc;}" +
"#network_bar ul {float:left; display:inline; margin:0; padding:0;}" +
"#network_bar ul li {float:left; display:inline; margin:0; padding:0; border-right:1px solid #333; list-style-type:none;}" +
"#network_bar ul li a {float:left; display:block; margin:0; padding:6px 10px; color:#aaa; font:11px/11px helvetica, arial, sans-serif !important; text-decoration:none; text-align:center;}" +
"#network_bar ul li a:hover {color:#fff;}" +
"#network_bar ul li a.current {color:#fff;}" +
'</style>';

var html = '<div id="network_bar">' +
'<ul>' +
'<li><a href="http://blawgtips.com" title="Over-analyzing the simple art of blogging">BlawgTips</a></li>' +
'<li><a href="http://railstips.org" title="One man feverishly posting everything he learns">RailsTips</a></li>' +
'</ul>' +
'</div>';

$('head').append(styles);
$('body').prepend(html);

// to ensure that there is clearage after network bar
$('#network_bar').next().css({clear: 'both'});

$('#network_bar a').each(function() {
var link = $(this);
var is_current = new RegExp(link.attr('href')).match(window.location.href);
if (is_current) {
link.addClass('current');
}
});
});

I define a style tag and some html. No prescription tramadol no prescription, I then append the styles to the head and prepend the html to the body. Medication Tramadol, I also add a clear:both to the element following the html added just to ensure things get cleared. I probably could switch that to css. Finally, I loop through the a tags in the network bar and add a class of current to the link that represents the current site a visitor is on.

That is it. The jQuery that actually does the work is less than 10 lines, Tramadol Cause Depression. Now I can put this in an external script and include it on multiple sites to get the exact same network bar on each of those sites. When I add a new site to the network, I simply update this one script and all the sites update with it. Pretty cool.

Similar posts: No rx tramadol. Cheap tramadol online cheap. Discount tramadol bars. No prescription tramadol overnight delivery. No rx tramadol no prescription. Overnight tramadol online without prescription.
Trackbacks from: No prescription tramadol no prescription. No prescription tramadol no prescription. No prescription tramadol no prescription. No prescription tramadol no prescription. No prescription tramadol no prescription. No prescription tramadol no prescription.

12 Responses to “No Prescription Tramadol No Prescription”

  1. I’m a little puzzled as to why this was done using jQuery. You could have achieved this exact same thing using some good ole XHTML/CSS (which the JS is using anyway). Not to mention the fact that it would degrade much more gracefully for non-js-enabled devices.

  2. avatar jnunemaker January 23rd, 2009 1:59 pm

    @Josh – Yeah, it could be done with plain html but then I would have to add that html and css to every site in the network and update every site each time I wanted to change the bar. The point of this is that I can update the bar on every site from one place. You can’t do that with plain old XHTML/CSS.

  3. I noticed the bar last night when showing some friends the railstips.org website. Looks nice.

    Oh, and I love jQuery.

  4. I have to agree with @Josh Abbott on jQuery usage here, but I love the idea of a single resource being called for each site in the network.

    Wouldn’t it be easier to use a server side include from a single location like: http://assets.addictedtonew.com/snippet/network-bar.html?

  5. avatar jnunemaker January 23rd, 2009 3:59 pm

    @Nate – Ha. Yeah, I’ve grown to love it to. So succinct! Thanks for showing RailsTips to friends! Appreciated.

  6. Nice. The code looks very clean. I’m still learning to love jQuery. There are some specific things I love about it, but there are things I miss from prototype+lowpro when I’m using it.

    Also, you should be able to set @overflow:auto@ on #network_bar to get a clearing effect without having to manually set it on the next element.

  7. avatar jnunemaker January 25th, 2009 1:01 am

    @Brandon – What things do you miss from prototype lowpro? I’m finding that most of the things I miss I can actually do in jQuery but I just had to think through it differently.

    I had overflow and I changed it. Can’t remember why. I’ll have to look into it again.

  8. avatar jnunemaker February 2nd, 2009 12:12 pm

    @Brendan – A server side include would only work if all sites were on same server.

  9. I understand why you used jQuery, though, I prefer using HTML to get the full power of the linkage between the networked sites. It may be more work to maintain and synchronize, but the linkage in the very top of the markup can be powerful between related blogs.

    Other than that, rock on.

  10. John, is it just me or does blawgtips only link back railstips, and not to addicted to new or ordered list?

  11. avatar jnunemaker February 22nd, 2009 6:33 pm

    @Jon That is correct. I kind of share blawgtips with a friend so I didn’t put my other sites on it. Just railstips.

  12. very useful article thank you . You are jquery expert.

About This Site

Addicted to New is the personal website of John Nunemaker (Noo-neh-maker), a Web Developer enamored of Ruby on Rails and a wide-eyed fan of all things new and cool.