The console in Google Chrome swears on the following code:

function isBd(user) { $.get('/index/8-0-' + user, function (data) { var bDate = new Date(Number($("#ubd", data).text()) * 1000); var date = new Date(); if ((bDate.getMonth() == date.getMonth()) && (bDate.getDate() == date.getDate())) { $('.bd' + user).html('<img src="h/sml/okore.gif" style="margin: 75px 80px 0px 100px; position: absolute;" alt="" width="64pxpxpx" height="64pxpxpx">'); } }) } 

What is the problem?

  • Why did you decide what exactly this code is? Can you show the page? - Zhukov Roman
  • And which line exactly? You have led too much code. - VladD
  • @Zhukov Roman: maybe there is a prehistoric version of jQuery? - VladD
  • @VladD: a lot of unknowns. In general, I would first look at the entire callstack. - Zhukov Roman
  • 2
    Try using jQuery 1.0, maybe it will solve the problem. - Zhukov Roman

2 answers 2

jQuery 1.3 was released in early 2009, and now already 2013. I advise you to use the latest stable version of the library.

    It seems to me a dog rummaged here:

     $("#ubd", data).text() 

    Ps. But what is this stream of consciousness? ... width = "64pxpxpx" height = "64pxpxpx" ...?

    • typo)) Can you tell me how to open this dog? otherwise I'm new to this business)) - naym
    • An error in the chrome console usually points to a specific file and a specific line in that file. The above code does not contain a call method, and it is he who is mentioned in the error. Make a console screenshot with an error. - Lucky
    • I do not have at hand fortunetelling cards. Without a full listing will not work. - istem
    • @istem, but what is actually wrong here? $ ("# ubd", data) .text () - Crasher