Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(".storyplayer a").bind("click", function() {
- // replace the <a> tag from the previous media player installation
- if (previousplayerlocation != null) {$("#" + previousplayerlocation + " .storyplayer").html(graboldcode);}
- // now remember this installation's <a> tag before it's replaced
- graboldcode = $(this).parent().html();
- // remember where I grabbed this <a> tag from
- previousplayerlocation = $(this).parents("div.storylisting").attr("id");
- // replaces the <a> tag with the media player.
- $(this).media({width: 190,height: 30});
- return false;
- });
- $('#someContainer').click( function(ev){
- var $el=$(ev.target);
- if ( $el.is('a') ){
- //do your stuff
- }
- });
- function playerClicked() {
- // replace the <a> tag from the previous media player installation
- if (previousplayerlocation != null) {
- $("#" + previousplayerlocation + " .storyplayer")
- .html(graboldcode)
- .click(playerClicked); // Re-add the onclick handler
- }
- // now remember this installation's <a> tag before it's replaced
- graboldcode = $(this).parent().html();
- // remember where I grabbed this <a> tag from
- previousplayerlocation = $(this).parents("div.storylisting").attr("id");
- // replaces the <a> tag with the media player.
- $(this).media({width: 190,height: 30});
- return false;
- }
- $(".storyplayer a").bind("click", playerClicked);
- $('a').livequery('click', function(){
- });
- $.livequery.run()
- $('a').livequery.expire('click')
- $('a').livequery(
- function(){ onmatchHandler},
- function(){ onmismatchHandler }
- );
Add Comment
Please, Sign In to add comment