За последние 24 часа нас посетили 17465 программистов и 1676 роботов. Сейчас ищут 948 программистов ...

Помогите с MobilyMap(jqwery плагин)

Тема в разделе "JavaScript и AJAX", создана пользователем newbb, 13 янв 2012.

  1. newbb

    newbb Активный пользователь

    С нами с:
    12 янв 2012
    Сообщения:
    10
    Симпатии:
    0
    Прошу помощи,сам в яваскриптах плохо разбираюсь а поправить плагин для меня вобще не посильная задача :) При загрузке карты появляются несколько маркеров,при нажатии на них карта центрируется по маркеру. Как сделать так чтобы при загрузке карты она сразу же центрировалось по 1 маркеру без клика на него.
    Функция центрирования по маркеру.
    Код (Text):
    1. point.click(function(){var $this=$(this),pointw=$this.width(),pointh=$this.height(),pos=$this.position(),py=pos.top,px=pos.left,wrap=$this.find(".markerContent").html();if(sets.setCenter){var center_y=-py+divh/2-pointh/2,center_x=-px+divw/2-pointw/2,center=map.check(center_x,center_y);content.animate({top:center.y+"px",left:center.x+"px"})}if(sets.popup){$("."+sets.popupClass).remove();$this.after($("<div />").addClass(sets.popupClass).css({position:"absolute",zIndex:"3"}).html(wrap).append($("<a />").addClass("close")));var popup=$this.next("."+sets.popupClass),popupw=popup.innerWidth(),popuph=popup.innerHeight(),y=py,x=px;popup.css({top:y+pointh+"px",left:x+"px",marginLeft:-(popupw/2-pointw/2)+"px"})}else{sets.onMarkerClick.call(this)}return false})
    Код плагина.
    Код (Text):
    1. (function($){$.fn.mobilymap=function(options){var defaults={position:"center",popupClass:"bubble",markerClass:"point",popup:true,cookies:true,caption:true,setCenter:true,navigation:true,navSpeed:1000,navBtnClass:"navBtn",outsideButtons:false,onMarkerClick:function(){},onPopupClose:function(){},onMapLoad:function(){}};var sets=$.extend({},defaults,options);return this.each(function(){var $this=$(this);$this.css({position:"relative",overflow:"hidden",cursor:"move"});$this.wrapInner($("<div />").addClass("imgContent").css({zIndex:"1",position:"absolute"}));var content=$this.find(".imgContent"),image=$this.find("img"),title=image.attr("alt"),point=$this.find("."+sets.markerClass),mouseDown=false,mx,my,ex,ey,imgw=image.width(),imgh=image.height(),divw=$this.width(),divh=$this.height();var cookies={create:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else{var expires=""}document.cookie=name+"="+value+expires+"; path=/"},erase:function(name){cookies.create(name,"",-1)},read:function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length)}}return null}};var map={check:function(x,y){if(y<(divh-imgh)){y=divh-imgh}else{if(y>0){y=0}}if(x<(divw-imgw)){x=divw-imgw}else{if(x>0){x=0}}return{x:x,y:y}},init:function(position){map.preloader();switch(position){case"center":var x=(divw-imgw)/2,y=(divh-imgh)/2;break;case"top left":var x=0,y=0;break;case"top right":var x=divw-imgw,y=0;break;case"bottom left":var x=0,y=divh-imgh;break;case"bottom right":var x=divw-imgw,y=divh-imgh;break;default:var new_position=position.split(" "),x=-(new_position[0]),y=-(new_position[1]);if(y<(divh-imgh)){y=divh-imgh}else{if(y>0){y=0}}if(x<(divw-imgw)){x=divw-imgw}else{if(x>0){x=0}}}if(sets.cookies){if(cookies.read("position")!=null){var pos=cookies.read("position").split(","),x=pos[0],y=pos[1]}else{var x=(divw-imgw)/2,y=(divh-imgh)/2}}content.css({top:y+"px",left:x+"px"})},preloader:function(){var loadimg=new Image(),src=image.attr("src");image.css({visibility:"hidden"});$this.append($("<div />").addClass("loader").css({position:"absolute",zIndex:"10",top:"0",left:"0",width:"100%",height:"100%"}));$(loadimg).load(function(){image.css({visibility:"visible"});$this.find(".loader").fadeOut(1000,function(){$(this).remove();if(sets.caption){$this.append($("<div />").addClass("imgCaption").html(title).hide());captiond=$this.find(".imgCaption");captionh=captiond.innerHeight();captiond.css({bottom:-captionh+"px",position:"absolute",zIndex:"7"}).show().animate({bottom:0})}sets.onMapLoad.call(this)})}).attr("src",src);image.removeAttr("alt")},mouse:function(e){var x=e.pageX,y=e.pageY;return{x:x,y:y}},update:function(e){var mouse=map.mouse(e),x=mouse.x,y=mouse.y,movex=x-mx,movey=y-my,top=ey+movey,left=ex+movex,check=map.check(left,top);content.css({top:check.y+"px",left:check.x+"px"});if(sets.cookies){cookies.create("position",check.x+","+check.y,7)}},navigation:{buttons:function(){$this.prepend($("<div />").addClass("mapNav").css({position:"absolute",zIndex:"7",left:"20px",top:"20px"}));nav=$this.find(".mapNav");for(i=0;i<4;i++){nav.append('<a href="#" class="'+sets.navBtnClass+" "+sets.navBtnClass+i+'" rel="'+i+'">btn'+i+"</a>")}nav.bind({mouseenter:function(){if(sets.caption){captiond.stop()}}})},move:function(){$("."+sets.navBtnClass).bind({mousedown:function(){var navbtn=$(this).attr("rel");if(navbtn==0){content.animate({top:0},sets.navSpeed)}if(navbtn==1){content.animate({left:divw-imgw+"px"},sets.navSpeed)}if(navbtn==2){content.animate({top:divh-imgh+"px"},sets.navSpeed)}if(navbtn==3){content.animate({left:0},sets.navSpeed)}},mouseup:function(){content.stop();var pos=content.position(),x=pos.left,y=pos.top;if(sets.cookies){cookies.create("position",x+","+y,7)}},mouseout:function(){content.stop()},click:function(){return false}})}}};if(sets.navigation){map.navigation.buttons();map.navigation.move()}content.bind({mousedown:function(e){e.preventDefault();mouseDown=true;var mouse=map.mouse(e);mx=mouse.x,my=mouse.y;var element=content.position();ex=element.left,ey=element.top;map.update(e)},mousemove:function(e){if(mouseDown){map.update(e)}return false},mouseup:function(){if(mouseDown){mouseDown=false}return false},mouseout:function(){if(mouseDown){mouseDown=false}return false},mouseenter:function(){if(sets.caption){captiond.animate({bottom:-captionh+"px"})}return false},mouseleave:function(){if(sets.caption){captiond.animate({bottom:0})}return false}});map.init(sets.position);point.each(function(){var $this=$(this),pos=$this.attr("id").split("-");x=pos[1],y=pos[2];$this.css({position:"absolute",zIndex:"2",top:y+"px",left:x+"px"})}).wrapInner($("<div />").addClass("markerContent").css({display:"none"}));point.click(function(){var $this=$(this),pointw=$this.width(),pointh=$this.height(),pos=$this.position(),py=pos.top,px=pos.left,wrap=$this.find(".markerContent").html();if(sets.setCenter){var center_y=-py+divh/2-pointh/2,center_x=-px+divw/2-pointw/2,center=map.check(center_x,center_y);content.animate({top:center.y+"px",left:center.x+"px"})}if(sets.popup){$("."+sets.popupClass).remove();$this.after($("<div />").addClass(sets.popupClass).css({position:"absolute",zIndex:"3"}).html(wrap).append($("<a />").addClass("close")));var popup=$this.next("."+sets.popupClass),popupw=popup.innerWidth(),popuph=popup.innerHeight(),y=py,x=px;popup.css({top:y+pointh+"px",left:x+"px",marginLeft:-(popupw/2-pointw/2)+"px"})}else{sets.onMarkerClick.call(this)}return false});$this.find(".close").live("click",function(){var $this=$(this);$this.parents("."+sets.popupClass).remove();setTimeout(function(){sets.onPopupClose.call(this)},100);return false});if(sets.outsideButtons){$(sets.outsideButtons).click(function(){var $this=$(this),rel=$this.attr("rel");div=content.find("."+sets.markerClass).filter(function(){return $(this).attr("id")==rel});div.click();return false})}})}}(jQuery));
    Ссылка на оффсайт.
    http://playground.mobily.pl/jquery/mobily-map/
     
  2. newbb

    newbb Активный пользователь

    С нами с:
    12 янв 2012
    Сообщения:
    10
    Симпатии:
    0
    ап, подскажите хотябы как реализовать.
     
  3. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    хз. надо пробовать с реальной картой. тут только функа а почему и где она используется ниоткуда не следует.
     
  4. Gromo

    Gromo Активный пользователь

    С нами с:
    24 май 2010
    Сообщения:
    2.786
    Симпатии:
    2
    Адрес:
    Ташкент
    сразу после загрузки вызывай click для первого маркера
     
  5. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    я думаю он не знает как...
     
  6. newbb

    newbb Активный пользователь

    С нами с:
    12 янв 2012
    Сообщения:
    10
    Симпатии:
    0
    +1 :(
     
  7. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    дай лучше ссылку на страницу, может кто сподобится замутить тебе такой подарок. но я сумняваюсь.
     
  8. Your

    Your Старожил

    С нами с:
    2 июл 2011
    Сообщения:
    4.074
    Симпатии:
    7

    Возьми, то, что отвечает за маркер и посмотри его код и увидишь как это делается.
    После того как карта загружается укажи чему - там тебе нужно, те - же данные, что происходят после установки маркера, только сделай сразу.
     
  9. newbb

    newbb Активный пользователь

    С нами с:
    12 янв 2012
    Сообщения:
    10
    Симпатии:
    0
    Я уже давно нашёл то, что отвечает за маркер и как делается тоже. Только не могу понять как сделать вызов этого куска кода. Пробовал написать свою функию по формуле которая написана в плагине столкнулся с проблемой деления значения переменной в которой вместе с числом идут пиксели (-150px) в плагине это делится на 2 а у меня делить не хочет из за того что данные строковые а как привести к числовым понять не смог. Если бы это был чистый jq я бы может разобрался а синтаксис плагинов меня совсем запутал.
    Как вызвать код который идёт после коментариев ниже?? (323 строка )
    Код (Text):
    1.  
    2. (function ($) {
    3.     $.fn.mobilymap = function (options) {
    4.         var defaults = {
    5.             position: "center",
    6.             popupClass: "bubble",
    7.             markerClass: "point",
    8.             popup: true,
    9.             cookies: true,
    10.             caption: true,
    11.             setCenter: true,
    12.             navigation: true,
    13.             navSpeed: 1000,
    14.             navBtnClass: "navBtn",
    15.             outsideButtons: false,
    16.             onMarkerClick: function () {},
    17.             onPopupClose: function () {},
    18.             onMapLoad: function () {}
    19.         };
    20.         var sets = $.extend({}, defaults, options);
    21.         return this.each(function () {
    22.             var $this = $(this);
    23.             $this.css({
    24.                 position: "relative",
    25.                 overflow: "hidden",
    26.                 cursor: "move"
    27.             });
    28.             $this.wrapInner($("<div />").addClass("imgContent").css({
    29.                 zIndex: "1",
    30.                 position: "absolute"
    31.             }));
    32.             var content = $this.find(".imgContent"),
    33.                 image = $this.find("img"),
    34.                 title = image.attr("alt"),
    35.                 point = $this.find("." + sets.markerClass),
    36.                 mouseDown = false,
    37.                 mx, my, ex, ey, imgw = image.width(),
    38.                 imgh = image.height(),
    39.                 divw = $this.width(),
    40.                 divh = $this.height();
    41.             var cookies = {
    42.                 create: function (name, value, days) {
    43.                     if (days) {
    44.                         var date = new Date();
    45.                         date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
    46.                         var expires = "; expires=" + date.toGMTString()
    47.                     } else {
    48.                         var expires = ""
    49.                     }
    50.                     document.cookie = name + "=" + value + expires + "; path=/"
    51.                 },
    52.                 erase: function (name) {
    53.                     cookies.create(name, "", -1)
    54.                 },
    55.                 read: function (name) {
    56.                     var nameEQ = name + "=";
    57.                     var ca = document.cookie.split(";");
    58.                     for (var i = 0; i < ca.length; i++) {
    59.                         var c = ca[i];
    60.                         while (c.charAt(0) == " ") {
    61.                             c = c.substring(1, c.length)
    62.                         }
    63.                         if (c.indexOf(nameEQ) == 0) {
    64.                             return c.substring(nameEQ.length, c.length)
    65.                         }
    66.                     }
    67.                     return null
    68.                 }
    69.             };
    70.             var map = {
    71.                 check: function (x, y) {
    72.                     if (y < (divh - imgh)) {
    73.                         y = divh - imgh
    74.                     } else {
    75.                         if (y > 0) {
    76.                             y = 0
    77.                         }
    78.                     }
    79.                     if (x < (divw - imgw)) {
    80.                         x = divw - imgw
    81.                     } else {
    82.                         if (x > 0) {
    83.                             x = 0
    84.                         }
    85.                     }
    86.                     return {
    87.                         x: x,
    88.                         y: y
    89.                     }
    90.                 },
    91.                 init: function (position) {
    92.                     map.preloader();
    93.                     switch (position) {
    94.                     case "center":
    95.                         var x = (divw - imgw) / 2,
    96.                             y = (divh - imgh) / 2;
    97.                         break;
    98.                     case "top left":
    99.                         var x = 0,
    100.                             y = 0;
    101.                         break;
    102.                     case "top right":
    103.                         var x = divw - imgw,
    104.                             y = 0;
    105.                         break;
    106.                     case "bottom left":
    107.                         var x = 0,
    108.                             y = divh - imgh;
    109.                         break;
    110.                     case "bottom right":
    111.                         var x = divw - imgw,
    112.                             y = divh - imgh;
    113.                         break;
    114.                     default:
    115.                         var new_position = position.split(" "),
    116.                             x = -(new_position[0]),
    117.                             y = -(new_position[1]);
    118.                         if (y < (divh - imgh)) {
    119.                             y = divh - imgh
    120.                         } else {
    121.                             if (y > 0) {
    122.                                 y = 0
    123.                             }
    124.                         }
    125.                         if (x < (divw - imgw)) {
    126.                             x = divw - imgw
    127.                         } else {
    128.                             if (x > 0) {
    129.                                 x = 0
    130.                             }
    131.                         }
    132.                     }
    133.                     if (sets.cookies) {
    134.                         if (cookies.read("position") != null) {
    135.                             var pos = cookies.read("position").split(","),
    136.                                 x = pos[0],
    137.                                 y = pos[1]
    138.                         } else {
    139.                             var x = (divw - imgw) / 2,
    140.                                 y = (divh - imgh) / 2
    141.                         }
    142.                     }
    143.                     content.css({
    144.                         top: y + "px",
    145.                         left: x + "px"
    146.                     })
    147.                 },
    148.                 preloader: function () {
    149.                     var loadimg = new Image(),
    150.                         src = image.attr("src");
    151.                     image.css({
    152.                         visibility: "hidden"
    153.                     });
    154.                     $this.append($("<div />").addClass("loader").css({
    155.                         position: "absolute",
    156.                         zIndex: "10",
    157.                         top: "0",
    158.                         left: "0",
    159.                         width: "100%",
    160.                         height: "100%"
    161.                     }));
    162.                     $(loadimg).load(function () {
    163.                         image.css({
    164.                             visibility: "visible"
    165.                         });
    166.                         $this.find(".loader").fadeOut(1000, function () {
    167.                             $(this).remove();
    168.                             if (sets.caption) {
    169.                                 $this.append($("<div />").addClass("imgCaption").html(title).hide());
    170.                                 captiond = $this.find(".imgCaption");
    171.                                 captionh = captiond.innerHeight();
    172.                                 captiond.css({
    173.                                     bottom: -captionh + "px",
    174.                                     position: "absolute",
    175.                                     zIndex: "7"
    176.                                 }).show().animate({
    177.                                     bottom: 0
    178.                                 })
    179.                             }
    180.                             sets.onMapLoad.call(this)
    181.                         })
    182.                     }).attr("src", src);
    183.                     image.removeAttr("alt")
    184.                 },
    185.                 mouse: function (e) {
    186.                     var x = e.pageX,
    187.                         y = e.pageY;
    188.                     return {
    189.                         x: x,
    190.                         y: y
    191.                     }
    192.                 },
    193.                 update: function (e) {
    194.                     var mouse = map.mouse(e),
    195.                         x = mouse.x,
    196.                         y = mouse.y,
    197.                         movex = x - mx,
    198.                         movey = y - my,
    199.                         top = ey + movey,
    200.                         left = ex + movex,
    201.                         check = map.check(left, top);
    202.                     content.css({
    203.                         top: check.y + "px",
    204.                         left: check.x + "px"
    205.                     });
    206.                     if (sets.cookies) {
    207.                         cookies.create("position", check.x + "," + check.y, 7)
    208.                     }
    209.                 },
    210.                 navigation: {
    211.                     buttons: function () {
    212.                         $this.prepend($("<div />").addClass("mapNav").css({
    213.                             position: "absolute",
    214.                             zIndex: "7",
    215.                             left: "20px",
    216.                             top: "20px"
    217.                         }));
    218.                         nav = $this.find(".mapNav");
    219.                         for (i = 0; i < 4; i++) {
    220.                             nav.append('<a href="#" class="' + sets.navBtnClass + " " + sets.navBtnClass + i + '" rel="' + i + '">btn' + i + "</a>")
    221.                         }
    222.                         nav.bind({
    223.                             mouseenter: function () {
    224.                                 if (sets.caption) {
    225.                                     captiond.stop()
    226.                                 }
    227.                             }
    228.                         })
    229.                     },
    230.                     move: function () {
    231.                         $("." + sets.navBtnClass).bind({
    232.                             mousedown: function () {
    233.                                 var navbtn = $(this).attr("rel");
    234.                                 if (navbtn == 0) {
    235.                                     content.animate({
    236.                                         top: 0
    237.                                     }, sets.navSpeed)
    238.                                 }
    239.                                 if (navbtn == 1) {
    240.                                     content.animate({
    241.                                         left: divw - imgw + "px"
    242.                                     }, sets.navSpeed)
    243.                                 }
    244.                                 if (navbtn == 2) {
    245.                                     content.animate({
    246.                                         top: divh - imgh + "px"
    247.                                     }, sets.navSpeed)
    248.                                 }
    249.                                 if (navbtn == 3) {
    250.                                     content.animate({
    251.                                         left: 0
    252.                                     }, sets.navSpeed)
    253.                                 }
    254.                             },
    255.                             mouseup: function () {
    256.                                 content.stop();
    257.                                 var pos = content.position(),
    258.                                     x = pos.left,
    259.                                     y = pos.top;
    260.                                 if (sets.cookies) {
    261.                                     cookies.create("position", x + "," + y, 7)
    262.                                 }
    263.                             },
    264.                             mouseout: function () {
    265.                                 content.stop()
    266.                             },
    267.                             click: function () {
    268.                                 return false
    269.                             }
    270.                         })
    271.                     }
    272.                 }
    273.             };
    274.             if (sets.navigation) {
    275.                 map.navigation.buttons();
    276.                 map.navigation.move()
    277.             }
    278.             content.bind({
    279.                 mousedown: function (e) {
    280.                     e.preventDefault();
    281.                     mouseDown = true;
    282.                     var mouse = map.mouse(e);
    283.                     mx = mouse.x, my = mouse.y;
    284.                     var element = content.position();
    285.                     ex = element.left, ey = element.top;
    286.                     map.update(e)
    287.                 },
    288.                 mousemove: function (e) {
    289.                     if (mouseDown) {
    290.                         map.update(e)
    291.                     }
    292.                     return false
    293.                 },
    294.                 mouseup: function () {
    295.                     if (mouseDown) {
    296.                         mouseDown = false
    297.                     }
    298.                     return false
    299.                 },
    300.                 mouseout: function () {
    301.                     if (mouseDown) {
    302.                         mouseDown = false
    303.                     }
    304.                     return false
    305.                 },
    306.                 mouseenter: function () {
    307.                     if (sets.caption) {
    308.                         captiond.animate({
    309.                             bottom: -captionh + "px"
    310.                         })
    311.                     }
    312.                     return false
    313.                 },
    314.                 mouseleave: function () {
    315.                     if (sets.caption) {
    316.                         captiond.animate({
    317.                             bottom: 0
    318.                         })
    319.                     }
    320.                     return false
    321.                 }
    322.             });
    323.             map.init(sets.position);
    324.  //////  КОД КОТОРЫЙ НУЖНО ВЫЗВАТЬ
    325.             point.each(function () {
    326.                 var $this = $(this),
    327.                     pos = $this.attr("id").split("-");
    328.                 x = pos[1], y = pos[2];
    329.                 $this.css({
    330.                     position: "absolute",
    331.                     zIndex: "2",
    332.                     top: y + "px",
    333.                     left: x + "px"
    334.                 })
    335.             }).wrapInner($("<div />").addClass("markerContent").css({
    336.                 display: "none"
    337.             }));
    338.             point.click(function () {
    339.                 var $this = $(this),
    340.                     pointw = $this.width(),
    341.                     pointh = $this.height(),
    342.                     pos = $this.position(),
    343.                     py = pos.top,
    344.                     px = pos.left,
    345.                     wrap = $this.find(".markerContent").html();
    346.                 if (sets.setCenter) {
    347.                     var center_y = -py + divh / 2 - pointh / 2,
    348.                         center_x = -px + divw / 2 - pointw / 2,
    349.                         center = map.check(center_x, center_y);
    350.                     content.animate({
    351.                         top: center.y + "px",
    352.                         left: center.x + "px"
    353.                     })
    354.                 }
    355.                 if (sets.popup) {
    356.                     $("." + sets.popupClass).remove();
    357.                     $this.after($("<div />").addClass(sets.popupClass).css({
    358.                         position: "absolute",
    359.                         zIndex: "3"
    360.                     }).html(wrap).append($("<a />").addClass("close")));
    361.                     var popup = $this.next("." + sets.popupClass),
    362.                         popupw = popup.innerWidth(),
    363.                         popuph = popup.innerHeight(),
    364.                         y = py,
    365.                         x = px;
    366.                     popup.css({
    367.                         top: y + pointh + "px",
    368.                         left: x + "px",
    369.                         marginLeft: -(popupw / 2 - pointw / 2) + "px"
    370.                     })
    371.                 } else {
    372.                     sets.onMarkerClick.call(this)
    373.                 }
    374.                 return false
    375.             });
    376.             $this.find(".close").live("click", function () {
    377.                 var $this = $(this);
    378.                 $this.parents("." + sets.popupClass).remove();
    379.                 setTimeout(function () {
    380.                     sets.onPopupClose.call(this)
    381.                 }, 100);
    382.                 return false
    383.             });
    384.             if (sets.outsideButtons) {
    385.                 $(sets.outsideButtons).click(function () {
    386.                     var $this = $(this),
    387.                         rel = $this.attr("rel");
    388.                     div = content.find("." + sets.markerClass).filter(function () {
    389.                         return $(this).attr("id") == rel
    390.                     });
    391.                     div.click();
    392.                     return false
    393.                 })
    394.             }
    395.         })
    396.     }
    397. }(jQuery));
     
  10. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    вы можете базарить тут до посинения. но без ссылки на реальную страницу это сделать очень сложно
     
  11. newbb

    newbb Активный пользователь

    С нами с:
    12 янв 2012
    Сообщения:
    10
    Симпатии:
    0
  12. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    вставь в <head> такое дело:

    <script>$(document).ready(function() {$('.point').first().click();});</script>
     
  13. newbb

    newbb Активный пользователь

    С нами с:
    12 янв 2012
    Сообщения:
    10
    Симпатии:
    0
    Спасибо!
    А на будущее как преобразовать строковое значение в числовое?
    к примеру
    var a = $('.imgContent').css('left');
    var b = a/2;
     
  14. sobachnik

    sobachnik Старожил

    С нами с:
    20 апр 2007
    Сообщения:
    3.380
    Симпатии:
    13
    Адрес:
    Дмитров, МО
  15. newbb

    newbb Активный пользователь

    С нами с:
    12 янв 2012
    Сообщения:
    10
    Симпатии:
    0
    Спасибо!