I'm using carrying out a tutorial came from here: http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/

This is actually the script I personally use:

<script type="text/javascript" language="javascript"> 
        $(function() {
            // SETUP:
                // When the info banner is clicked:
                $('#setup').click(function() {
                    $('#intro').css("display","none");
                    $.cookie('intro', 'collapsed');
                });
            // COOKIES
                // Info banner state
                var intro = $.cookie('intro');

            // READ THE COOKIES
                if (intro == 'collapsed') {
                  $('#intro').css("display","none");
                };
        });
</script> 

The script hides the next div because the cookie is read:

<div class="feedback attention" id="intro">
            Text goes here
            <a id="setup" href="#">Ok I get it, please hide this</a> 
</div>

Everything work great however when the page loads the div is proven for any moment. I suppose the answer would be to present two different bits of markup serverside based on the cookie info. I've no clue how to pull off this.

On-page load, you could utilize php to determine the cookie, after which give a hidden class. Something similar to <div class="<?= $_COOKIE['intro'] == 'collapsed' ? 'hidden':'' ?>">

Edit:

In CSS then, you can include something similar to .hidden { display: none; } and employ jQuery to include or remove that class.

if you work with PHP:

<?php if($_COOKIE['intro'] != 'collapsed'){ ?>

<div class="feedback attention" id="intro">
            Text goes here
            <a id="setup" href="#">Ok I get it, please hide this</a> 
</div>

<?php } ?>

To totally take away the div as opposed to just hide it.

You could simply do something similar to:

<?php

if($_COOKIE['intro'] != 'collapsed') {\

    //echo div...

}

check $_COOKIE array for 'intro'

if ($_COOKIE['intro'] == 'collapsed') 
//...

simply, then add type of "hidden" class towards the div, or specify it like style="display: none;"

//edit really, with the addition of the "style" attribute you be sure that the div isn't displayed the moment get parsed, while using the "class" property could potentially cause interval while awaiting CSS file.

thus

<div<?= ($_COOKIE['intro'] == 'collapsed') ? ' style="display: none"' : '' ?>> ..</div>

is better here.