Add css styles to output
-
I am pulling custom fields into the markers created on a google map so there is a backend to edit that contetn. I have it working with :
var point = new GLatLng(48.5139,-123.150531); var marker = createMarker(point,"Lime Kiln State Park", '<?php $post_id = 182; $my_post = get_post($post_id); $title = $my_post->post_title; $snip = get_post_meta($post_id, 'mapExcerpt', true); echo $title; echo $snip; ?>')
However I am stumped at how to echo in div classes around the title and the content. If I try something like this with the div wrapping the title it breaks the javascript.
var point = new GLatLng(48.5139,-123.150531); var marker = createMarker(point,"Lime Kiln State Park", '<?php $post_id = 182; $my_post = get_post($post_id); $title = $my_post->post_title; $snip = get_post_meta($post_id, 'mapExcerpt', true); echo "<div class="theTitle">"; echo $title; echo "</div>"; echo $snip; ?>')
Can anyone please enlighten me on how i could include the css. Is there a way I can define and then echo it back in so the necessary quotes to define the style dont break it?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add css styles to output’ is closed to new replies.