0

how can escape this char ----> ;

i ask becuse i want to use this to send some javascript to the head using wp_head

this is want i want to attach to wp_head:

add_action('wp_head', 'load_lighbox_portfolio');

function load_lighbox_portfolio() {
    echo '<!--===STR=========== LIGHTBOX =================-->'. "\n";
    echo '<script type="text/javascript" src="'. get_bloginfo('template_url') .'/jquery-lightbox/js/jquery.js"></script>' . "\n";
    echo '<script type="text/javascript" src="'. get_bloginfo('template_url') .'/jquery-lightbox/js/jquery.lightbox-0.5.js"></script>' . "\n";
    echo '<link rel="stylesheet" type="text/css" href="'. get_bloginfo('template_url') .'/jquery-lightbox/css/jquery.lightbox-0.5.css" media="screen" />' . "\n";
    echo '<script type="text/javascript">' . "\n";
    echo '$(function() {' . "\n";
    echo '$('a.lightbox').lightBox(); // Select all links with lightbox class' . "\n";
    echo '});' . "\n";
    echo '</script>' . "\n";
    echo '<!--===END=========== LIGHTBOX =================-->'. "\n";   
}

Everything works great.. only trouble is that ---> ; symbole...
i looked for a replacement HTML char but couldnt find one..

Help would be apreaciated :)

  • If anyone Dropes by and know how to mark "solved" i would love to know how.. – Sagive SEO Nov 5 '11 at 3:34
  • Answer your own question, and mark it as answered. – Wyck Nov 6 '11 at 7:56
  • Ok - was afraid that might be rude :) – Sagive SEO Nov 6 '11 at 16:05
1

* SOLVED * sorry for the bother. my problem wasnt this char at all --> ;
but this line which i missed:

echo '$('a.lightbox').lightBox(); // Select all links with lightbox class' . "\n";

Sometimes sterring at code i miss such stuff.. sorry = thanks for anyone who watched.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.