On Sep 30, 6:03*am, Neredbojias <neredboj...@gmail.com> wrote:
> On 29 Sep 2010, cwdjrxyz <spamtr...@cwdjr.info> wrote:
>
>
>
> > See
> >http://www.cwdjr.net/html5/ParrotPuz...cturePuzzle.ht
> > ml and see if you can drag the images and that they will remain where
> > they were just before you release the mouse key. I have tried the
> > latest versions of Firefox, Opera, Chrome, Safari for Windows, and
> > IE9- beta, and all failed.
>
> > A new attribute introduced for <img> in html5 is draggable="true". It
> > may be that few if any browsers support this yet. Of course I may
> > have made an error. The page validates as html5 at w3c, and the css
> > validator finds no errors.
>
> > It seems this new image attribute might have some uses. Of course you
> > can now use javascript to drag, and some might remember my parrot
> > puzzle which used a script to make images draggable. If the draggable
> > attribute becomes widely supported in the future, it might be more
> > easy to use than script for applications such as games and puzzles.
>
> Er, it's a bit more complicated than that. *Furthermore, <img>s are
> draggable by default.
>
> Here's a link that shows some working draggabilities and might help
> explain it. *You need javascript in any case.
>
> http://ljouanneau.com/lab/html5/demodragdrop.html
It turns out that the new html5 attribute draggable for <img> is less
useful than I had hoped. It defaults to auto if you do not specify
draggable, which is "true" on at least all of my browsers. Thus
setting to draggable ="true" really does nothing. If you set
draggable="false", what you get if the browser understands the html5
attribute is that the image will not respond at all if you try to
drag it anywhere. I find that of all of the most recent versions of
browsers I mentioned, except Opera, are responding to the html5
attribute draggable="false" by not allowing the image to be moved
anywhere. Opera does not respond to draggable and thus only allows you
to drag and drop to another file as is the case for earlier versions
of html.. Unfortunately you will thus still have to use a script to
drag an image around on the web page window and drop it when you
release the mouse button. See
http://www.cwdjr.net/html5/ParrotPuz...rePuzzle2.html
for the test page set for draggable="false".