0

I am using the ext.net framework to develop a project at work. But I have encountered a problem with jQuery's (document).ready function.

Specifically when loading the page the jQuery never seems to be executed.

$(document).ready(function () 
{
    var find = $("#NewsPanel");
    var offset = find.offset();
    var top = offset.top - 5;
    var left = offset.left + 70;
    $("#img_NewsnoteOnAll").offset({ top: top, left: left });
    $("#debug").text = top.toString + left.toString();
}

If I remove the document ready function it can't fetch the objects.

BenMorel
  • 34,448
  • 50
  • 182
  • 322

1 Answers1

2
$(document).ready(function () 
{
    var find = $("#NewsPanel");
    var offset = find.offset();
    var top = offset.top - 5;
    var left = offset.left + 70;
    $("#img_NewsnoteOnAll").offset({ top: top, left: left });
    $("#debug").text = top.toString + left.toString();
});

You forgot ); at end of line, after last }.

Snake Eyes
  • 16,287
  • 34
  • 113
  • 221