[jQuery] Re: How to check is element "droppable"

2009-09-16 Thread Boris Trivic

thanks a lot, that's answer.

Best regards!

On Sep 16, 7:29 pm, "Richard D. Worth"  wrote:
> var isDroppable = $("#first").is(".ui-droppable"); // boolean
>
> or
>
> var droppables = $("div").filter(".ui-droppable"); // collection
>
> Also note, there's a separate list for jQuery UI questions, should you have
> any more:
>
> http://groups.google.com/group/jquery-ui
>
> - Richard
>
> On Wed, Sep 16, 2009 at 1:15 PM, Boris Trivic  wrote:
>
> > yes I'm using jQuery droppable. I am trying to check if some element
> > is droppable. Example:
>
> > /// code:
> > 
> >   $("#first").droppable();
> >...
> >...
> > 
>
> > 
> > 
> > /// end code
>
> > now I need to check both divs (first and second) and find out which is
> > droppable. In this example: script must write: "div 'first' is
> > droppable, div 'second' is not droppable"
>
> > Understand now?
>
> > On Sep 16, 2:49 pm, "Richard D. Worth"  wrote:
> > > It's not clear. Are you trying to use an element with a tag name of
> > > 'droppable'? Are you using jQuery UI Droppable?
> > > - Richard
>
> > > On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic 
> > wrote:
>
> > > > if question isn't clear, I can explain better :)
>
> > > > On Sep 15, 7:33 pm, Boris Trivic  wrote:
> > > > > Hi.
>
> > > > > How I can check this? I have next part of code where I must check is
> > > > > element "tag" = droppable.
>
> > > > > Instead code after "// pseudo:" i must add some function that check
> > if
> > > > > element is droppable. If true it must write some text in that element
> > > > > (For example: $(tag).text('bla bla') )
>
> > > > > // code /
> > > > > function help(){
> > > > > // array generated by PHP:
> > > > > 
> > > > > // random num. from upper array:
> > > > > var rand = Math.floor( Math.random() *
> > cor.length
> > > > );
> > > > > // Set tag
> > > > > if(rand != 0){
> > > > > var tag = '#p'+rand;
> > > > > }
> > > > > // here goes code that check if "tag" is
> > > > > droppable...
> > > > >/// pseudo:
> > > > >if(tag is droppable){
> > > > > alert('is dropable');
> > > > >}}
>
> > > > >  CODE /


[jQuery] Re: How to check is element "droppable"

2009-09-16 Thread Richard D. Worth
var isDroppable = $("#first").is(".ui-droppable"); // boolean

or

var droppables = $("div").filter(".ui-droppable"); // collection

Also note, there's a separate list for jQuery UI questions, should you have
any more:

http://groups.google.com/group/jquery-ui

- Richard

On Wed, Sep 16, 2009 at 1:15 PM, Boris Trivic  wrote:

>
> yes I'm using jQuery droppable. I am trying to check if some element
> is droppable. Example:
>
> /// code:
> 
>   $("#first").droppable();
>...
>...
> 
>
> 
> 
> /// end code
>
> now I need to check both divs (first and second) and find out which is
> droppable. In this example: script must write: "div 'first' is
> droppable, div 'second' is not droppable"
>
> Understand now?
>
>
> On Sep 16, 2:49 pm, "Richard D. Worth"  wrote:
> > It's not clear. Are you trying to use an element with a tag name of
> > 'droppable'? Are you using jQuery UI Droppable?
> > - Richard
> >
> > On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic 
> wrote:
> >
> > > if question isn't clear, I can explain better :)
> >
> > > On Sep 15, 7:33 pm, Boris Trivic  wrote:
> > > > Hi.
> >
> > > > How I can check this? I have next part of code where I must check is
> > > > element "tag" = droppable.
> >
> > > > Instead code after "// pseudo:" i must add some function that check
> if
> > > > element is droppable. If true it must write some text in that element
> > > > (For example: $(tag).text('bla bla') )
> >
> > > > // code /
> > > > function help(){
> > > > // array generated by PHP:
> > > > 
> > > > // random num. from upper array:
> > > > var rand = Math.floor( Math.random() *
> cor.length
> > > );
> > > > // Set tag
> > > > if(rand != 0){
> > > > var tag = '#p'+rand;
> > > > }
> > > > // here goes code that check if "tag" is
> > > > droppable...
> > > >/// pseudo:
> > > >if(tag is droppable){
> > > > alert('is dropable');
> > > >}}
> >
> > > >  CODE /
>


[jQuery] Re: How to check is element "droppable"

2009-09-16 Thread Boris Trivic

yes I'm using jQuery droppable. I am trying to check if some element
is droppable. Example:

/// code:

   $("#first").droppable();
...
...




/// end code

now I need to check both divs (first and second) and find out which is
droppable. In this example: script must write: "div 'first' is
droppable, div 'second' is not droppable"

Understand now?


On Sep 16, 2:49 pm, "Richard D. Worth"  wrote:
> It's not clear. Are you trying to use an element with a tag name of
> 'droppable'? Are you using jQuery UI Droppable?
> - Richard
>
> On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic  wrote:
>
> > if question isn't clear, I can explain better :)
>
> > On Sep 15, 7:33 pm, Boris Trivic  wrote:
> > > Hi.
>
> > > How I can check this? I have next part of code where I must check is
> > > element "tag" = droppable.
>
> > > Instead code after "// pseudo:" i must add some function that check if
> > > element is droppable. If true it must write some text in that element
> > > (For example: $(tag).text('bla bla') )
>
> > > // code /
> > > function help(){
> > > // array generated by PHP:
> > > 
> > > // random num. from upper array:
> > > var rand = Math.floor( Math.random() * cor.length
> > );
> > > // Set tag
> > > if(rand != 0){
> > > var tag = '#p'+rand;
> > > }
> > > // here goes code that check if "tag" is
> > > droppable...
> > >/// pseudo:
> > >if(tag is droppable){
> > > alert('is dropable');
> > >}}
>
> > >  CODE /


[jQuery] Re: How to check is element "droppable"

2009-09-16 Thread Richard D. Worth
It's not clear. Are you trying to use an element with a tag name of
'droppable'? Are you using jQuery UI Droppable?
- Richard

On Tue, Sep 15, 2009 at 2:36 PM, Boris Trivic  wrote:

>
> if question isn't clear, I can explain better :)
>
> On Sep 15, 7:33 pm, Boris Trivic  wrote:
> > Hi.
> >
> > How I can check this? I have next part of code where I must check is
> > element "tag" = droppable.
> >
> > Instead code after "// pseudo:" i must add some function that check if
> > element is droppable. If true it must write some text in that element
> > (For example: $(tag).text('bla bla') )
> >
> > // code /
> > function help(){
> > // array generated by PHP:
> > 
> > // random num. from upper array:
> > var rand = Math.floor( Math.random() * cor.length
> );
> > // Set tag
> > if(rand != 0){
> > var tag = '#p'+rand;
> > }
> > // here goes code that check if "tag" is
> > droppable...
> >/// pseudo:
> >if(tag is droppable){
> > alert('is dropable');
> >}}
> >
> >  CODE /
>


[jQuery] Re: How to check is element "droppable"

2009-09-15 Thread Boris Trivic

if question isn't clear, I can explain better :)

On Sep 15, 7:33 pm, Boris Trivic  wrote:
> Hi.
>
> How I can check this? I have next part of code where I must check is
> element "tag" = droppable.
>
> Instead code after "// pseudo:" i must add some function that check if
> element is droppable. If true it must write some text in that element
> (For example: $(tag).text('bla bla') )
>
> // code /
> function help(){
> // array generated by PHP:
> 
> // random num. from upper array:
> var rand = Math.floor( Math.random() * cor.length );
> // Set tag
> if(rand != 0){
> var tag = '#p'+rand;
> }
> // here goes code that check if "tag" is
> droppable...
>/// pseudo:
>if(tag is droppable){
> alert('is dropable');
>}}
>
>  CODE /