how can you find all the links (without bindings) and put them inside the list in the order in which they appear in jQuery.
For instance:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, Donec sit amet ipsum ut justo fermentum hendrerit ultricies.
So this will be as follows:
Lorem ipsum
sit amet,
adipiscing elit.
sit amet ipsum ut justo fermentum hendrerit ultricies.
embed.ly , , , youtube/flickr , . , , , youtube (.. , ).
(, , dolar, youtube , embed.ly).
php php.
:
<script type="text/javascript">
$(document).ready(function() {
$("a").embedly({}, function(oembed, dict){
if ( oembed == null)
alert("no embedly content found");
var output = "<a class='embedly' href='#'><img src='"+oembed.thumbnail_url+"' /></a><span>"+oembed.title+"</span>";
output += oembed['code'];
$(dict["node"]).parent().html( output );
});
var anchors = $("a"); anchors.embedly(); anchors.filter("[href*=flx.me]").addClass("googlenl");
$('a.embedly').live("click", function(e){
e.preventDefault();
$(this).parents('li').find('.embed').toggle();
});
});
</script>
html , :
> <div id="content">
> <div class="youtube">
> <p><a class="embedly" href="#"><img
> src="phpForum_files/hqdefault.jpg"></a><span>&
> League 2005-2006 RealMadrid vs Arsenal
> 2ndleg</span><div
> class="embed"><object height="360"
> width="640"><param name="wmode"
> value="opaque"><param name="movie"
> value="http://www.youtube.com/v/7aPGa9Gqj2c?fs=1"><param
> name="allowFullScreen"
> value="true"><param
> name="allowscriptaccess"
> value="always"><embed
> src="phpForum_files/7aPGa9Gqj2c.swf"
> type="application/x-shockwave-flash"
> allowscriptaccess="always"
> allowfullscreen="true" wmode="opaque"
> height="360"
> width="640"></object></div></p>
> </div> </div>
. .