jquery - Uninterrupted music using popunder or opening site in a new tab -
i have wanted keep writing on discussion, reputation doesn't allow me edit or answer (sorry that): uninterrupted background music on website
so going point:
- i hate music on website, unfortunately couldn't find way change client's mind time.
- we working through comunication (graphic) agency, can't tell end client he's xxiot , need make agency happy since giving lot , right thing.
so bottom line want music on site, , possibly have not restart @ each page load.
i decided avoid frames.
i'm struggling in between ways trying find "best" one:
opening small popunder window music (imagine: "we recommend visit our website music..if hate close popup") pro: should not bad seo cons: popunder aren't reliable, browser changes , stop working, dont want spend time fixing that.. :) script tryed https://github.com/hpbuniat/jquery-popunder said works on firefox , ie, on chrome 25 opens popup, on safari doesn't work well.
do vice versa: domain opens on page logo, background , music, automatically opens new tab regular site...if closes inital tab amen, not going have music, if don't have continous music...when close browser silence comes :) pro: should work on browser (or @ least can have backup enter site link, usefull seo too) cons: seo??? going index other pages? enough put enter site link? i'm worried that. :(
i hate myself, hate music on websites damn..
thank guys hope spending tear me :)
it doesn't seem enourmous amount of work me make work ajax, , if nice experience make better @ using , understaing technology used today, instead of toying hacky bits of code 10 years ago , copying , pasting obscure scripts popunder dark side of web.
all work have done not wasted, in fact that's principle of progressive enhancement. make work (including seo bots) , improve it.
something transform anchor tags ajax requests still fallback plain page requests otherwise.
$('body').on('click', 'a', function() { var url = $(this).attr('href'); $.ajax({ url: url }).done(function(response) { $('body').html(response); }); return false; }); you can add ?ajax=1 request url instruct backend return body when present.
obviously scripts/css have served on initial page head won't change (unless want make more comples) , event bindings need triggered or delegated body.
you'll need div player (with fixed position maybe) code more like
<head> ... </head> <body> <div id="player></div> <div id="wrapper">[page html]</div> </body> and you'll target #wrapper instead of body.
Comments
Post a Comment