On Tue, Dec 22, 2009 at 10:34 AM, Mike Walsh <[email protected]>wrote:
>
> [ ... snipped ... ]
>
> Thanks for pointing me in the right direction. This is what I ended
> up getting to work:
>
> jQuery("span.event", ".calendar-table").each(function(){
> var html = this.innerHTML.replace(/(<br\s*\/*>)\s*\*/
> g, \'$1\');
> jQuery(this).html(html) ;
> }) ;
>
> I changed the regular expression slightly to eliminate the .* portion
> and changed .html() to .innerHTML. I don't know enough jQuery to know
> why I had to do that but had seen it elsewhere so tried it and it
> worked.
>
> Thanks,
>
> Mike
>
.html() retrieves the innerHTML.
Really no functional difference, but for the sake of consistency, since
you're leveraging jQuery, I'd prefer to see consistent jQuery code (unless
there's a compelling reason not to).
And yeah... just a preference. Not saying wrong or right. But I am saying
you shouldn't have "-had- to do that" :)
Anyway, glad you got it working. That's the important bit :)
--
Charlie Griefer
http://charlie.griefer.com/
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.