Как не надо добавлять заголовки через JavaScript 😅
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
function addhead(headpicid, headid){ smjq('#'+headpicid+'_outside tr:nth-child(1) td:nth-child(1)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/1.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(1) td:nth-child(2)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/2.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(1) td:nth-child(3)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/3.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(2) td:nth-child(1)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/4.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(2) td:nth-child(3)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/5.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(3) td:nth-child(1)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/6.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(3) td:nth-child(2)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/7.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(3) td:nth-child(3)').append('<img class="hdimg" style="padding:0;margin:0" src="http://img01.tsdm.net/frame/' + headid + '/8.png" />'); smjq('#'+headpicid+'_outside tr:nth-child(1) td:nth-child(1)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/1.png) no-repeat"}); smjq('#'+headpicid+'_outside tr:nth-child(1) td:nth-child(2)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/2.png) repeat-x"}); smjq('#'+headpicid+'_outside tr:nth-child(1) td:nth-child(3)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/3.png) no-repeat"}); smjq('#'+headpicid+'_outside tr:nth-child(2) td:nth-child(1)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/4.png) repeat-y"}); smjq('#'+headpicid+'_outside tr:nth-child(2) td:nth-child(3)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/5.png) repeat-y"}); smjq('#'+headpicid+'_outside tr:nth-child(3) td:nth-child(1)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/6.png) no-repeat"}); smjq('#'+headpicid+'_outside tr:nth-child(3) td:nth-child(2)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/7.png) repeat-x"}); smjq('#'+headpicid+'_outside tr:nth-child(3) td:nth-child(3)').css({"background":"url(http://img01.tsdm.net/frame/" + headid + "/8.png) no-repeat"}); } |