自作收藏chosen和kindeditor
chosen(下拉搜索插件)和kindeditor(输入文字域变成输入窗口)插件的提示显示,插件加载靠后,依靠延时来实现加载后于插件加载
<script>
$(document).ready(function(){
var selectshow = $('#module').next('div').find('li.search-field');
var selectts = '<li style="color:rgba(150,150,150,02);line-height:25px">'+$('#module').attr('placeholder')+'</li>'
var select0 = selectshow.after(selectts);
function textarea0(){
var ts = $('#functionDesc').attr('placeholder');
var tshtml = '<span style="color:rgba(150,150,150,02)">'+ts+'</span>';
var contentts = $('#functionDesc').parent().children('div:nth-child(1)').children('div:nth-child(2)').find('iframe').contents().find("body");
contentts.html(tshtml);
contentts.focus(function(){if(contentts.html()==tshtml) contentts.html('')});
contentts.blur(function(){ if(contentts.html()=='')contentts.html(tshtml);});
}
setTimeout(textarea0,1000);
});
</script>