0
Firebug 1.7.3을 사용하여 Firefox 3.6.21에서 일부 디버깅을하고있었습니다. 페이지가 처음로드 될 때 실행하려는 Javascript가 전혀로드되지 않습니다. Firebug를 열어 문제가 무엇인지 확인하고 다시로드하고 갑자기 작동하는지 확인합니다.Firebug가 Firefox 3.6의 Javascript 환경을 변경했습니다.
나는 여기서 무슨 일이 일어나고 있는지 전혀 모른다.
function initStations() {
//console.log("in stations")
ringContainer = $("#ringContainer");
ringWidth = ringHeight = ringContainer.innerWidth();
//console.log(ringWidth + " " + ringHeight);
originX = (ringWidth/2) - 0;
originY = (ringHeight/2);
radius = originY + 20;
//console.log(originX + " " + originY + " " + radius);
// get the ul containing the stations
stationList = $("#stationList");
// an array of the li elements
stationLiElems = $("#stationList li");
// how many stations
length = stationLiElems.size();
// distance between stations in degrees
spacing = (360/length)
// 360 degrees in circle divided by the number of stations
// array of stations
stations = [];
// debug
//console.log(stationList);
stationLiElems.each(function(index, element) {
//console.log(index +" - "+ spacing);
stations[index] = {
'element' : element,
// http://stackoverflow.com/questions/925118/algorithm-for-finding-out-pixel-coordinates-on-a-circumference-of-a-circle
'x' : originX + radius * Math.sin(spacing * index * 0.0174532925),
'y' : originY + radius * Math.cos(spacing * index * 0.0174532925)
}
$(element).css({'top' : stations[index].y , 'left' : stations[index].x });
});
해당 기능을 입력하고 있습니까? 아니면 이전보다 실패입니까? Firebug가 비활성화 된 상태에서 오류 콘솔의 오류는 무엇입니까? –
1) 다양한 브라우저에서 테스트하고 비교할 수 있습니까 (Chrome, Opera, IE)? 2) 별도의 Firefox 프로필에서 테스트하고 비교할 수 있습니까? (명령 행에서'firefox.exe -P'를 실행하고 새로운 프로파일을 만들고 Firebug를 설치하고 페이지를 실행하십시오) –