|
|
(같은 사용자의 중간 판 13개는 보이지 않습니다) |
1번째 줄: |
1번째 줄: |
| /* user:다메즈마 */
| |
| function randomRange(n1, n2) {
| |
| return Math.floor( (Math.random() * (n2 - n1)) + n1 );
| |
| }
| |
| if($(document).width() > 8)
| |
| {
| |
| var akarin =
| |
| {
| |
| img:"http://a2.img.mobypicture.com/8622e6c3bff4bdfc59f55a6fd6a92dba_view.jpg",
| |
| };
| |
| var ayase =
| |
| {
| |
| img:"http://pds26.egloos.com/pds/201305/12/49/b0012149_518ea3bd93d70.jpg",
| |
| };
| |
| var mascot_list =
| |
| [
| |
| akarin,
| |
| ayase,
| |
| ];
| |
| var select = mascot_list[randomRange(0,mascot_list.length)];
| |
| var comment = select.comment;
| |
|
| |
| var wrap_div = document.createElement("div");
| |
| var mascot_img_html = document.createElement("img");
| |
|
| |
|
| mascot_img_html.src = select.img;
| |
|
| |
| $(wrap_div).css("position","fixed");
| |
| $(wrap_div).css("right","32px");
| |
| $(wrap_div).css("bottom","32px");
| |
|
| |
| $(mascot_img_html).css("width",250px);
| |
| $(wrap_div).append(mascot_img_html);
| |
| $(document.body).append(wrap_div);
| |
| $(document.body).append(balloon);
| |
| mascot_img_html.is_small = false;
| |
| $(mascot_img_html).click(function()
| |
| {
| |
| if(this.is_small == false)
| |
| {
| |
| $(this).css("height",128);
| |
| }
| |
| else
| |
| {
| |
| $(this).css("height",256);
| |
| }
| |
| this.is_small = !this.is_small;
| |
| });
| |
| }
| |