Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7304 closed bug (wontfix)

$("#Something").ready(/*someFunction*/) problem!

Reported by: Sojaner Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: ready comment Cc:
Blocked by: Blocking:

Description

I had some code like this at the beginning of my Javascript codes on a HTML code:

$("Something").ready(someFunction);

        $(document).ready(PageInit);

        function PageInit() {

I was checking something on my code, so I needed the first line to be disabled.

I did this:

$("Something").ready(/*someFunction*/);

In fact, I passed a comment to the ready method instead os a function...

It disabled all the codes on my page and the

$(document).ready(PageInit);

no more worked!

I guess that it may be a global bug and all the methods may be infected! So that would be much nicer if the methods detect that the object passed to them is a comment text (if it would be possible!).

Thanks a million for your great job.

Change History (1)

comment:1 Changed 12 years ago by addyosmani

Keywords: ready comment added
Resolution: wontfix
Status: newclosed

If you need to comment out the first line, simply comment out the entire line and not the actual function being passed to ready - there's no reason just that part of the line should have this done. Using $().ready(handler) on something outside the scope of document/window is also generally not advised. Given the very low number of cases where I imagine this might be done, I'm marking as wontfix for now.

Note: See TracTickets for help on using tickets.