Skip to main content

Bug Tracker

Side navigation

#7304 closed bug (wontfix)

Opened October 25, 2010 11:54AM UTC

Closed October 25, 2010 02:28PM UTC

$("#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.

Attachments (0)
Change History (1)

Changed October 25, 2010 02:28PM UTC by addyosmani comment:1

keywords: → ready comment
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.