2013-10-12 2 views
0

사람이 도와주세요 제발 날 페이지로드에 jQuery 스플래시 화면을 사용하고 있습니다. 순간에 시작시로드되는 스플래시 화면이라는 div가 있지만이 스크립트에 div calle 래퍼를 추가하려고합니다. 두 divs로드, 어떻게 할 수 있을까?두 번째 div 요소를 jquery 스크립트에 추가 하시겠습니까?

감사

(함수 ($)는 {

$.fn.splashScreen = function(settings){ 

     // Providing default options: 

     settings = $.extend({ 
      textLayers  : [], 
      textShowTime : 1500, 
      textTopOffset : 80 
     },settings); 

     var promoIMG = this; 

     // Creating the splashScreen div. 
     // The rest of the styling is in splashscreen.css 

     var splashScreen = $('<div>',{ 
      id : 'splashScreen', 
      css:{ 
       backgroundImage  : promoIMG.css('assets/img/drop.jpg'), 
       backgroundPosition : 'center '+promoIMG.offset().top+'px', 
       height    : $(document).height() 
      } 
     }); 

답변

0

난 당신이 몸에 spashscreen의 사업부를 추가 할 생각?

$("body").append(splashScreen); 

그런 다음 두 번째 사업부와 동일한 작업을 수행 두 가지를 모두 추가 하시겠습니까? 아마도 나는 정확하게 이해하지 못하고 있습니다.

관련 문제