Skip to content

var $allVideos = jQuery("iframe[src^='http://player.vimeo.com'], iframe[src^='http://www.youtube.com'], iframe[src^='http://www.youtube-nocookie.com'], iframe[src^='http://serviceapi.nmv.naver.com'], embed[src^='http://www.youtube.com'], embed[src^='http://serviceapi.nmv.naver.com']"),
 
$fluidEl = jQuery("body");
 
$allVideos.each(function() {
jQuery(this)
.data('aspectRatio', this.height / this.width)
.removeAttr('height')
.removeAttr('width');
});
 
jQuery(window).resize(function() {
var newWidth = $fluidEl.width();
$allVideos.each(function() {
var $el = jQuery(this);
$el
.width('300')
.height('260');
});
}).resize();


가로 사이즈 300px으로 동영상을 보여주는 js 입니다.


파일를 따로 생성후 모바일js 폴더에 넣어주시고, 해당 파일를 불러올수 있게 링크를 넣어주셔요.


<script type="text/javascript" src="사용될 경로와 파일명"></script>

profile

I see no changes, wake up in the morning and I ask myself

Is life worth living should I blast myself

Things would never be the same.

엮인글 :
http://adminplay.com/169501/132/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
40 Tip 모바일에서도 이미지 리사이징 기능 적용하기 l2zeo 2013-01-24 51688
39 Tip 그누보드4(G4) 변수들 l2zeo 2013-01-22 49420
38 Tip 그누보드 메타태그(description, keywords) 설정 file [1] ADMINPLAY 2012-01-16 15397
37 Tip IE css핵 (css hack)과 IE filter file [1] l2zeo 2013-07-03 14544
36 Tip SSL 보안인증 로그인,회원가입 적용하기 [1] l2zeo 2012-08-15 11800
35 Tip 그누보드 팁. $wr_id 값을 사용하지 않습니다_라고 뜰때 해결방법 1 (그누보드 관련 게시판이 있다면....) ADMINPLAY 2012-01-16 11362
34 Tip 공지사항 리스트에 이중 출력 안되도록. ADMINPLAY 2012-01-16 10403
33 Tip [Lazy Load Plugin for jQuery] 효율적인 이미지 로딩 file l2zeo 2013-01-23 10219
32 Tip 오늘의 주인공 onfocus="this.blur();"와 a:visited를 소개합니다. ADMINPLAY 2012-01-16 9991
31 Tip 페이스북 담벼락에 자동 게시하는 법 l2zeo 2013-01-23 9616
30 Tip 그누보드 회원 포인트 일괄삭제 하기 (mb_point + 포인트 내역) ADMINPLAY 2012-01-16 9585
29 Tip 포인트가 마이너스일때 = 포인트 마이너스 회원들 포인트를 0으로 ... l2zeo 2013-03-15 9536
28 Tip robots.txt 관련 Tip. l2zeo 2013-05-30 9509
27 Tip 출석시 과거 특정날짜 자동출석 인정하는 방법 - 미션출석부 l2zeo 2012-03-12 9322
26 Tip 투표(설문) 새창 띄우기 ADMINPLAY 2012-01-16 8826
25 Tip 중규모 커뮤니티 속도저하방지를 위한 튜닝 [그누보드 관련] ADMINPLAY 2012-01-16 8789
24 Tip IE 버그와 해결책들 l2zeo 2013-07-03 8079
23 Tip 포인트 반복 차감 기간 제한 ADMINPLAY 2012-01-16 8047
22 Tip 효율적으로 디비 쿼리수 줄이기 Tip ADMINPLAY 2012-01-16 8013
21 Tip 서버이전후 Warning: Cannot modify header information - headers already sent by... 뜰때 l2zeo 2012-09-30 7876

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234