我想基于我手动输入的var来拉出不同的样式表,我该怎么做?
varDivision = "" //SET TOTAL NUMBER OF DIVISIONS IN YOUR LEAGUE
varTeams = "" //ENTER TOTAL NUMBER OF TEAMS IN YOUR LEAGUE
if 1 division 5 teams link this stylesheet "url"
if 1 division 6 teams link this stylesheet "url"
if 2 divisions 10 teams link this stylesheet "url"
if 3 divisions 12 teams link this stylesheet "url"
等等。我可以列出每种可能性......
答案 0 :(得分:0)
您可以在<link/>
部分
<head/>
元素
$('head')
.find('*[data-dynamicCss="true"]').remove()
.append( $('<link rel="stylesheet" type="text/css" data-dynamicCss="true" />')
.attr('href', 'your stylesheet url') );