2009/4/9 Phlip <phlip2...@gmail.com> > > >> <div id="<%= post.title %>" style="display: none;"> > > > Just make sure that <%= post.title %> is unique for the page. > > An id must conform to roughly the same rules as a JavaScript identifier. No > leading numbers, no spaces, no funny business. Of course no browser bothers > to > enforce that, but such rules exist to help us Rails programmers write > rigorous > code that goes far beyond "browser forgiveness". > > <div id="post_<%= post.id %>" style="display: none;"> > > Just to complicate things, it was recommended in the past not to use underscores for id and class names because of the css specs. http://devedge-temp.mozilla.org/viewsource/2001/css-underscores/ I don't think it's a problem these days but I started to hyphenate in place of underscoring because I noticed my syntax highlighter didn't like underscores which led me to this whole weird issue.
-- Daniel Bush http://blog.web17.com.au http://github.com/danielbush/sifs/tree/master http://github.com/danielbush --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---