[jQuery] Re: App like hangman

2009-09-01 Thread Boris Trivic

Problem fixed with: helper: "clone" in draggable element...

On Aug 26, 8:19 pm, Boris Trivic  wrote:
> Well, maybe you don't understand whats the problem, so here is
> screenshot:
>
> http://caraudio-rs.info/snapshot1.png
>
> Do you think it's the bug or my mistake?
>
> On Aug 25, 1:08 pm, Boris Trivic  wrote:
>
> > omg!
> > I just opened it in Opera (Linux) and there is some kind of bug or
> > what? Instead revert to original location, chars returns about
> > 100-150px right... Can someone take a look and check if same problem
> > occurs?
>
> > Maybe I shoult report it to jQuery dev team?
>
> > On Aug 25, 7:00 pm, Boris Trivic  wrote:
>
> > > Yeah, sure, it imposible to convert object to string, object has
> > > methods and properties for that what I want.
> > > Wheathever, thanks a lot Brett one more time, you saved me.
>
> > > I finished a main part of project, there is still some little stufs to
> > > fix and correct. You can take a look on next link, if you want:
>
> > >http://caraudio-rs.info/nal_7/
>
> > > On Aug 25, 12:17 am, Brett Ritter  wrote:
>
> > > > On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivic 
> > > > wrote:
> > > > > I can success print ui.draggable to console, but how to convert it to
> > > > > string?
> > > > > I need to write it into some element with .innerHTML and I will
> > > > > probably use it in "for" loop...
>
> > > > I think you are trying the hard way.
>
> > > > ui.draggable is not a string, but a jQuery element.  Use that as you 
> > > > see fit.
>
> > > > For Hangman you're probably looking to copy either the text  (
> > > > ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
> > > > you need to clone the source you want ui.draggable.clone() (note that
> > > > any events bound to the original are not bound to the clone unless you
> > > > use live() )
>
> > > > Trying to convert a jQuery element to a string doesn't make sense
> > > > unless you say what "string" you want - the text, the html, the id,
> > > > these are all different strings.
>
> > > > --
> > > > Brett Ritter / SwiftOne
> > > > swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-26 Thread Boris Trivic

Well, maybe you don't understand whats the problem, so here is
screenshot:

http://caraudio-rs.info/snapshot1.png

Do you think it's the bug or my mistake?


On Aug 25, 1:08 pm, Boris Trivic  wrote:
> omg!
> I just opened it in Opera (Linux) and there is some kind of bug or
> what? Instead revert to original location, chars returns about
> 100-150px right... Can someone take a look and check if same problem
> occurs?
>
> Maybe I shoult report it to jQuery dev team?
>
> On Aug 25, 7:00 pm, Boris Trivic  wrote:
>
> > Yeah, sure, it imposible to convert object to string, object has
> > methods and properties for that what I want.
> > Wheathever, thanks a lot Brett one more time, you saved me.
>
> > I finished a main part of project, there is still some little stufs to
> > fix and correct. You can take a look on next link, if you want:
>
> >http://caraudio-rs.info/nal_7/
>
> > On Aug 25, 12:17 am, Brett Ritter  wrote:
>
> > > On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivic wrote:
> > > > I can success print ui.draggable to console, but how to convert it to
> > > > string?
> > > > I need to write it into some element with .innerHTML and I will
> > > > probably use it in "for" loop...
>
> > > I think you are trying the hard way.
>
> > > ui.draggable is not a string, but a jQuery element.  Use that as you see 
> > > fit.
>
> > > For Hangman you're probably looking to copy either the text  (
> > > ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
> > > you need to clone the source you want ui.draggable.clone() (note that
> > > any events bound to the original are not bound to the clone unless you
> > > use live() )
>
> > > Trying to convert a jQuery element to a string doesn't make sense
> > > unless you say what "string" you want - the text, the html, the id,
> > > these are all different strings.
>
> > > --
> > > Brett Ritter / SwiftOne
> > > swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-26 Thread Boris Trivic

http://caraudio-rs.info/snapshot1.png

On Aug 26, 8:15 pm, Boris Trivic  wrote:
> Well, maybe you don't understand whats the problem, so here is
> screenshot:
>
> Do you think it's the bug or my mistake?


[jQuery] Re: App like hangman

2009-08-26 Thread Boris Trivic

Well, maybe you don't understand whats the problem, so here is
screenshot:

Do you think it's the bug or my mistake?


[jQuery] Re: App like hangman

2009-08-25 Thread Boris Trivic

omg!
I just opened it in Opera (Linux) and there is some kind of bug or
what? Instead revert to original location, chars returns about
100-150px right... Can someone take a look and check if same problem
occurs?

Maybe I shoult report it to jQuery dev team?

On Aug 25, 7:00 pm, Boris Trivic  wrote:
> Yeah, sure, it imposible to convert object to string, object has
> methods and properties for that what I want.
> Wheathever, thanks a lot Brett one more time, you saved me.
>
> I finished a main part of project, there is still some little stufs to
> fix and correct. You can take a look on next link, if you want:
>
> http://caraudio-rs.info/nal_7/
>
> On Aug 25, 12:17 am, Brett Ritter  wrote:
>
> > On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivic wrote:
> > > I can success print ui.draggable to console, but how to convert it to
> > > string?
> > > I need to write it into some element with .innerHTML and I will
> > > probably use it in "for" loop...
>
> > I think you are trying the hard way.
>
> > ui.draggable is not a string, but a jQuery element.  Use that as you see 
> > fit.
>
> > For Hangman you're probably looking to copy either the text  (
> > ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
> > you need to clone the source you want ui.draggable.clone() (note that
> > any events bound to the original are not bound to the clone unless you
> > use live() )
>
> > Trying to convert a jQuery element to a string doesn't make sense
> > unless you say what "string" you want - the text, the html, the id,
> > these are all different strings.
>
> > --
> > Brett Ritter / SwiftOne
> > swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-25 Thread Boris Trivic

Yeah, sure, it imposible to convert object to string, object has
methods and properties for that what I want.
Wheathever, thanks a lot Brett one more time, you saved me.

I finished a main part of project, there is still some little stufs to
fix and correct. You can take a look on next link, if you want:

http://caraudio-rs.info/nal_7/

On Aug 25, 12:17 am, Brett Ritter  wrote:
> On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivic wrote:
> > I can success print ui.draggable to console, but how to convert it to
> > string?
> > I need to write it into some element with .innerHTML and I will
> > probably use it in "for" loop...
>
> I think you are trying the hard way.
>
> ui.draggable is not a string, but a jQuery element.  Use that as you see fit.
>
> For Hangman you're probably looking to copy either the text  (
> ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
> you need to clone the source you want ui.draggable.clone() (note that
> any events bound to the original are not bound to the clone unless you
> use live() )
>
> Trying to convert a jQuery element to a string doesn't make sense
> unless you say what "string" you want - the text, the html, the id,
> these are all different strings.
>
> --
> Brett Ritter / SwiftOne
> swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-24 Thread Brett Ritter

On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivic wrote:
> I can success print ui.draggable to console, but how to convert it to
> string?
> I need to write it into some element with .innerHTML and I will
> probably use it in "for" loop...

I think you are trying the hard way.

ui.draggable is not a string, but a jQuery element.  Use that as you see fit.

For Hangman you're probably looking to copy either the text  (
ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
you need to clone the source you want ui.draggable.clone() (note that
any events bound to the original are not bound to the clone unless you
use live() )

Trying to convert a jQuery element to a string doesn't make sense
unless you say what "string" you want - the text, the html, the id,
these are all different strings.

-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-24 Thread Boris Trivic

OK, again I need some help:

I can success print ui.draggable to console, but how to convert it to
string?
I need to write it into some element with .innerHTML and I will
probably use it in "for" loop...

Any your comment will be helpfull.

On Aug 24, 2:45 am, Boris Trivic  wrote:
> Brett thanks for your help, I success founded solution deeper on link
> that you posted.
> If someone needs, here is code:
>
> $(".place").droppable({
> drop: function(e, ui) {
> console.log(ui.droppable);
> }
>
> });
>
> This code writes in console (if you use Firebug), which element is
> dragged (id of that el.). You can customize code for your needs...
>
> On Aug 20, 4:30 am, Brett Ritter  wrote:
>
> > On Wed, Aug 19, 2009 at 11:07 AM, Boris Trivic wrote:
> > > When I take on of draggable divs and put it on 3rd div (fixed), how I
> > > can get ID of that div which is dragged on 3rd div.
>
> > Ah! Now I understand.  (Good examples).
>
> > Sadly, Drag-and-drop is not something I've played with.  However, from
> > looking at the jqueryUI docs, it appears what you are looking for is
> > the "Droppable" plugin, which receives "draggable" objects:
>
> >http://jqueryui.com/demos/droppable/
>
> > Hope that helps!
>
> > --
> > Brett Ritter / SwiftOne
> > swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-23 Thread Brett Ritter

On Wed, Aug 19, 2009 at 11:07 AM, Boris Trivic wrote:
> When I take on of draggable divs and put it on 3rd div (fixed), how I
> can get ID of that div which is dragged on 3rd div.

Ah! Now I understand.  (Good examples).

Sadly, Drag-and-drop is not something I've played with.  However, from
looking at the jqueryUI docs, it appears what you are looking for is
the "Droppable" plugin, which receives "draggable" objects:

http://jqueryui.com/demos/droppable/

Hope that helps!

-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-23 Thread Boris Trivic

Brett thanks for your help, I success founded solution deeper on link
that you posted.
If someone needs, here is code:


$(".place").droppable({
drop: function(e, ui) {
console.log(ui.droppable);
}
});

This code writes in console (if you use Firebug), which element is
dragged (id of that el.). You can customize code for your needs...

On Aug 20, 4:30 am, Brett Ritter  wrote:
> On Wed, Aug 19, 2009 at 11:07 AM, Boris Trivic wrote:
> > When I take on of draggable divs and put it on 3rd div (fixed), how I
> > can get ID of that div which is dragged on 3rd div.
>
> Ah! Now I understand.  (Good examples).
>
> Sadly, Drag-and-drop is not something I've played with.  However, from
> looking at the jqueryUI docs, it appears what you are looking for is
> the "Droppable" plugin, which receives "draggable" objects:
>
> http://jqueryui.com/demos/droppable/
>
> Hope that helps!
>
> --
> Brett Ritter / SwiftOne
> swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-19 Thread Boris Trivic

here is live page, but just begin

http://caraudio-rs.info/nal_7/

On Aug 19, 11:07 pm, Boris Trivic  wrote:
> look. Exaple: i have 3 div's with different ID's.
> First 2 divs are draggable, 3rd is fixed.
> When I take on of draggable divs and put it on 3rd div (fixed), how I
> can get ID of that div which is dragged on 3rd div.
>
> --code:
> 
> $("#div1").draggable();
> $("#div2").draggable();
> 
>
> 
>  A 
>  B 
>  __ 
> ..
>
> -end code--
>
> If you read my 1st post you can see what I want to make...
>
> You understand now?
>
> On Aug 19, 10:13 pm, Brett Ritter  wrote:
>
>
>
> > On Wed, Aug 19, 2009 at 9:40 AM, Boris Trivic wrote:
> > > anyone? :s
>
> > I'm afraid I'm not understanding your question.  Can you provide
> > simple html that you are trying to read/manipulate?
>
> > --
> > Brett Ritter / SwiftOne
> > swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-19 Thread Boris Trivic

look. Exaple: i have 3 div's with different ID's.
First 2 divs are draggable, 3rd is fixed.
When I take on of draggable divs and put it on 3rd div (fixed), how I
can get ID of that div which is dragged on 3rd div.

--code:

$("#div1").draggable();
$("#div2").draggable();



 A 
 B 
 __ 
..

-end code--

If you read my 1st post you can see what I want to make...

You understand now?

On Aug 19, 10:13 pm, Brett Ritter  wrote:
> On Wed, Aug 19, 2009 at 9:40 AM, Boris Trivic wrote:
> > anyone? :s
>
> I'm afraid I'm not understanding your question.  Can you provide
> simple html that you are trying to read/manipulate?
>
> --
> Brett Ritter / SwiftOne
> swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-19 Thread Brett Ritter

On Wed, Aug 19, 2009 at 9:40 AM, Boris Trivic wrote:
> anyone? :s

I'm afraid I'm not understanding your question.  Can you provide
simple html that you are trying to read/manipulate?

-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-19 Thread Boris Trivic

anyone? :s

On Aug 19, 12:20 am, Boris Trivic  wrote:
> I think you didn't understand my question.
> I need to check is right char (it is in ) putted on right line
> (lines are divs, too).
>
> On Aug 18, 11:38 pm, anurag pal  wrote:
>
>
>
> > Hi,
>
> > You can use float for this purpose Like:
>
> > a
> > b > style="width:50%;float:left;">c
>
> > you can use attr method for getting this.
>
> > Regards,
> > Anurag Pal
>
> > On Tue, Aug 18, 2009 at 7:07 PM, Boris Trivic  wrote:
>
> > > OK thanks for reply.
>
> > > Which function enables me to find out which div is puted on which?
> > > Exaple:
>
> > > div1     div2
>
> > >    div3
>
> > > when I pul div 2 on div3, how i can find out which element is puted on
> > > div3 (div1 or div2)?
>
> > > On Aug 18, 2:18 pm, anurag pal  wrote:
> > > > Hi,
>
> > > > You can acheive this with Jquery.
>
> > > > Regards,
> > > > Anurag Pal
>
> > > > On Tue, Aug 18, 2009 at 12:55 AM, Boris Trivic 
> > > wrote:
>
> > > > > Hi everyone.
>
> > > > > I need to create one project (some kind of game) and I want to know,
> > > > > is that possible create with jQuery?
>
> > > > > Page should looks like this:
> > > > > _---_---_---_---_
> > > > > ---
> > > > > A B C D E F G
> > > > >  H I J K L M
> > > > > N O P R S T
> > > > > U V Z X Y Z
> > > > > --
>
> > > > > word lines ->  __  __  __  __  __
>
> > > > > _---_---_---_---_---_-
> > > > > In upper part, there is alphabet and from it I have to pull chars on
> > > > > lines in down part.
> > > > > Behaviors of application:
>
> > > > > 1  If char is not on correct place it shoul be different color.
> > > > > 2  when I pull one char from upper table and drop it on line, it
> > > > > shouldn't disapear from list of chars
> > > > > 3  there must be possibility to pull out char from word lines
> > > > > 4  when user moves char (ex: 20px) it should disapear from lines
>
> > > > > I'm planing to put chars in  and maybe it will be image, but
> > > > > that's not matter. I founded good documentation (draggable and
> > > > > dropable)and I was reading for few minutes, and I thing it should be
> > > > > possible. Is there any function, option or something that checks which
> > > > > element is draged on which?
>
> > > > > If someone has some good idea, link or some other kind of help, I'll
> > > > > be thankfull for anything.
>
> > > > > Thank you


[jQuery] Re: App like hangman

2009-08-18 Thread Boris Trivic

I think you didn't understand my question.
I need to check is right char (it is in ) putted on right line
(lines are divs, too).

On Aug 18, 11:38 pm, anurag pal  wrote:
> Hi,
>
> You can use float for this purpose Like:
>
> a
> b style="width:50%;float:left;">c
>
> you can use attr method for getting this.
>
> Regards,
> Anurag Pal
>
>
>
> On Tue, Aug 18, 2009 at 7:07 PM, Boris Trivic  wrote:
>
> > OK thanks for reply.
>
> > Which function enables me to find out which div is puted on which?
> > Exaple:
>
> > div1     div2
>
> >    div3
>
> > when I pul div 2 on div3, how i can find out which element is puted on
> > div3 (div1 or div2)?
>
> > On Aug 18, 2:18 pm, anurag pal  wrote:
> > > Hi,
>
> > > You can acheive this with Jquery.
>
> > > Regards,
> > > Anurag Pal
>
> > > On Tue, Aug 18, 2009 at 12:55 AM, Boris Trivic 
> > wrote:
>
> > > > Hi everyone.
>
> > > > I need to create one project (some kind of game) and I want to know,
> > > > is that possible create with jQuery?
>
> > > > Page should looks like this:
> > > > _---_---_---_---_
> > > > ---
> > > > A B C D E F G
> > > >  H I J K L M
> > > > N O P R S T
> > > > U V Z X Y Z
> > > > --
>
> > > > word lines ->  __  __  __  __  __
>
> > > > _---_---_---_---_---_-
> > > > In upper part, there is alphabet and from it I have to pull chars on
> > > > lines in down part.
> > > > Behaviors of application:
>
> > > > 1  If char is not on correct place it shoul be different color.
> > > > 2  when I pull one char from upper table and drop it on line, it
> > > > shouldn't disapear from list of chars
> > > > 3  there must be possibility to pull out char from word lines
> > > > 4  when user moves char (ex: 20px) it should disapear from lines
>
> > > > I'm planing to put chars in  and maybe it will be image, but
> > > > that's not matter. I founded good documentation (draggable and
> > > > dropable)and I was reading for few minutes, and I thing it should be
> > > > possible. Is there any function, option or something that checks which
> > > > element is draged on which?
>
> > > > If someone has some good idea, link or some other kind of help, I'll
> > > > be thankfull for anything.
>
> > > > Thank you


[jQuery] Re: App like hangman

2009-08-18 Thread anurag pal
Hi,

You can use float for this purpose Like:

a
bc

you can use attr method for getting this.

Regards,
Anurag Pal

On Tue, Aug 18, 2009 at 7:07 PM, Boris Trivic  wrote:

>
> OK thanks for reply.
>
> Which function enables me to find out which div is puted on which?
> Exaple:
>
> div1 div2
>
>
>div3
>
> when I pul div 2 on div3, how i can find out which element is puted on
> div3 (div1 or div2)?
>
> On Aug 18, 2:18 pm, anurag pal  wrote:
> > Hi,
> >
> > You can acheive this with Jquery.
> >
> > Regards,
> > Anurag Pal
> >
> > On Tue, Aug 18, 2009 at 12:55 AM, Boris Trivic 
> wrote:
> >
> > > Hi everyone.
> >
> > > I need to create one project (some kind of game) and I want to know,
> > > is that possible create with jQuery?
> >
> > > Page should looks like this:
> > > _---_---_---_---_
> > > ---
> > > A B C D E F G
> > >  H I J K L M
> > > N O P R S T
> > > U V Z X Y Z
> > > --
> >
> > > word lines ->  __  __  __  __  __
> >
> > > _---_---_---_---_---_-
> > > In upper part, there is alphabet and from it I have to pull chars on
> > > lines in down part.
> > > Behaviors of application:
> >
> > > 1  If char is not on correct place it shoul be different color.
> > > 2  when I pull one char from upper table and drop it on line, it
> > > shouldn't disapear from list of chars
> > > 3  there must be possibility to pull out char from word lines
> > > 4  when user moves char (ex: 20px) it should disapear from lines
> >
> > > I'm planing to put chars in  and maybe it will be image, but
> > > that's not matter. I founded good documentation (draggable and
> > > dropable)and I was reading for few minutes, and I thing it should be
> > > possible. Is there any function, option or something that checks which
> > > element is draged on which?
> >
> > > If someone has some good idea, link or some other kind of help, I'll
> > > be thankfull for anything.
> >
> > > Thank you
>


[jQuery] Re: App like hangman

2009-08-18 Thread Boris Trivic

OK thanks for reply.

Which function enables me to find out which div is puted on which?
Exaple:

div1 div2


div3

when I pul div 2 on div3, how i can find out which element is puted on
div3 (div1 or div2)?

On Aug 18, 2:18 pm, anurag pal  wrote:
> Hi,
>
> You can acheive this with Jquery.
>
> Regards,
> Anurag Pal
>
> On Tue, Aug 18, 2009 at 12:55 AM, Boris Trivic  wrote:
>
> > Hi everyone.
>
> > I need to create one project (some kind of game) and I want to know,
> > is that possible create with jQuery?
>
> > Page should looks like this:
> > _---_---_---_---_
> > ---
> > A B C D E F G
> >  H I J K L M
> > N O P R S T
> > U V Z X Y Z
> > --
>
> > word lines ->  __  __  __  __  __
>
> > _---_---_---_---_---_-
> > In upper part, there is alphabet and from it I have to pull chars on
> > lines in down part.
> > Behaviors of application:
>
> > 1  If char is not on correct place it shoul be different color.
> > 2  when I pull one char from upper table and drop it on line, it
> > shouldn't disapear from list of chars
> > 3  there must be possibility to pull out char from word lines
> > 4  when user moves char (ex: 20px) it should disapear from lines
>
> > I'm planing to put chars in  and maybe it will be image, but
> > that's not matter. I founded good documentation (draggable and
> > dropable)and I was reading for few minutes, and I thing it should be
> > possible. Is there any function, option or something that checks which
> > element is draged on which?
>
> > If someone has some good idea, link or some other kind of help, I'll
> > be thankfull for anything.
>
> > Thank you


[jQuery] Re: App like hangman

2009-08-17 Thread anurag pal
Hi,

You can acheive this with Jquery.

Regards,
Anurag Pal

On Tue, Aug 18, 2009 at 12:55 AM, Boris Trivic  wrote:

>
> Hi everyone.
>
> I need to create one project (some kind of game) and I want to know,
> is that possible create with jQuery?
>
> Page should looks like this:
> _---_---_---_---_
> ---
> A B C D E F G
>  H I J K L M
> N O P R S T
> U V Z X Y Z
> --
>
> word lines ->  __  __  __  __  __
>
> _---_---_---_---_---_-
> In upper part, there is alphabet and from it I have to pull chars on
> lines in down part.
> Behaviors of application:
>
> 1  If char is not on correct place it shoul be different color.
> 2  when I pull one char from upper table and drop it on line, it
> shouldn't disapear from list of chars
> 3  there must be possibility to pull out char from word lines
> 4  when user moves char (ex: 20px) it should disapear from lines
>
> I'm planing to put chars in  and maybe it will be image, but
> that's not matter. I founded good documentation (draggable and
> dropable)and I was reading for few minutes, and I thing it should be
> possible. Is there any function, option or something that checks which
> element is draged on which?
>
> If someone has some good idea, link or some other kind of help, I'll
> be thankfull for anything.
>
> Thank you
>