intanpalupidn / jquery-oembed

Automatically exported from code.google.com/p/jquery-oembed
0 stars 0 forks source link

Replace the anchor tags instead of wrapping the embedded content with them #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On Safari, using jquery-oembed to enhance anchor tags that point to flash 
embedded content 
fails.  The anchor tag (correctly) takes the onclick handler away from the 
embedded flash player 
causing issues.  In other words, the video does not play inline, but instead 
the browser is taken to 
the href location.

jquery-oembed has two ways to use it, but I would argue that the canonical way 
should be to 
replace an anchor tag with an href.  That way, the page gracefully degrades 
when javascript isn't 
available and Google still sees the outbound links.

I argue that instead of changing the innerHTML of the "container," the 
"container" should be 
replaced instead.   Please see the attached patch.   It's a one-line change 
that makes all the 
difference.

What version of the product are you using? On what operating system?
v1.0.1 on Safari 4.0.2 on OS X 10.5.7

This plugin is great, btw.  It will save me a lot of time.

Original issue reported on code.google.com by ryan.mcg...@gmail.com on 14 Jul 2009 at 2:42

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for your patch. 

You are right, jquery.oembed should replace instead of filling code inside.

In the new version I have just uploaded, replace is the default behavior, but 
you can  
can select other ways like "fill" or "append".

Original comment by rchamo...@gmail.com on 1 Oct 2009 at 3:07

GoogleCodeExporter commented 8 years ago

Original comment by rchamo...@gmail.com on 1 Oct 2009 at 3:31