jquery - Including datanodes in html by hiding : good idea? -


i add data html page showed dynamically (by means of jquery). data xml (so in fact part of html dom).

now hiding css (.data { display:none; }) html :

<div id="section1"> <h2>section 1</h2>     <p>a visible paragraph </p>     <!-- data has section 1 -->     <data class="data">        <eg1>some data</eg1>        <eg2>more data</eg2>     </data> </div> 

the data not shown , can reached jquery.

while seems work fine, want know now, in process, if way of working has drawbacks i'm not thinking of now...

update :

of course it's non-html tags also. use

<div class="data">     <div class="eg1> 

just : then, question remains.

thanks input!

the drawback having no non-js fallback. robust code create static html displayed. , use javascript hide "hidden" data , allow user show again via links/fns/whatever.

this useful because users no javascript can still see content search engine crawlers (or other crawlers/bots) interpret visibility may find useful.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -