[英]Flowtype.js Specific object targeting
Does this line of code mean that the flowtype.js is being applied to all the type in the body tag? 这行代码是否意味着将flowtype.js应用于body标签中的所有类型?
$('body').flowtype();
I am new to javascript. 我是javascript新手。 If I want to have the flowtype target just H1's and P's do I just replace the 'body' with 'h1' and 'p'? 如果我只想将流类型目标设置为H1和P,是否只需将“ body”替换为“ h1”和“ p”?
$('h1, p').flowtype()
should do it. $('h1, p').flowtype()
应该这样做。
If you want to target a class, like <p class="paragraph">
, you'd use $('.paragraph').flowtype()
如果要定位一个类,例如<p class="paragraph">
,则可以使用$('.paragraph').flowtype()
Or, if you want to target an id, like <p id="main-paragraph">
, you'd use $('#main-paragraph').flowtype()
或者,如果要定位一个ID,例如<p id="main-paragraph">
,则可以使用$('#main-paragraph').flowtype()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.