Most jQuery methods will work on 0 or more elements. However some methods
require at least one element. These methods usually return some value
related to the element. The only time you would see an error like "method i
called is not found" is if you don't include a plugin's script file before
using it.

--
Brandon Aaron

On 9/26/07, Eridius <[EMAIL PROTECTED]> wrote:
>
>
>
> I though if a selector return nothing and i tried to call a method, it
> would
> just fail by saying that the method i called is not a function.
>
>
> Brandon Aaron wrote:
> >
> > The jQuery collection is empty ... meaning it didn't match any any
> > elements.
> > Which means my_element.length == 0
> >
> > --
> > Brandon Aaron
> >
> > On 9/25/07, Eridius <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>
> >> [Exception... "'Dimensions: jQuery collection is empty' when calling
> >> method:
> >> [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
> >> (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
> >>
> >> anyone know why this would happen?  here is that this happens on:
> >>
> >> $('.input:eq(' + index + ')').livequery('click', function()
> >>     {
> >>         if($('#' + indexs[index] + '_list').css('display') === 'none'
> &&
> >> $('#' + indexs[index] + '_list').text() != '')
> >>         {
> >>             //alert('start');
> >>             var my_element = $('[EMAIL PROTECTED]' + indexs[index]
> >> +']').parent('div');
> >>             var offset = my_element.offset();
> >>             var height = my_element.height();
> >>
> >>             var top = offset.top + height;
> >>             var left = offset.left;
> >>
> >>             $('#' + indexs[index] + '_list').css({'display': 'block',
> >>                        'top': top,
> >>                        'left': left,
> >>                        'z-index': 2,
> >>                        'border': '2px solid black'});
> >>             //alert('end');
> >>         }
> >>         else
> >>         {
> >>             $('#' + indexs[index] + '_list').css({'display': 'none'});
> >>         }
> >>     });
> >> --
> >> View this message in context:
> >> http://www.nabble.com/dimensions-issue--tf4518540s15494.html#a12889201
> >> Sent from the JQuery mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/dimensions-issue--tf4518540s15494.html#a12900442
> Sent from the JQuery mailing list archive at Nabble.com.
>
>

Reply via email to