[jQuery] jquery.Flash plugin
I was looking at the jquery.flash plugin and it looks like what I need to get the job done but I am not able to figure out how to do it. Here is some sample code from the plugin site $('.custom').flash(null, null, function(htmlOptions){ // do stuff }); Below is the code I tried using script type=text/javascript var strToAdd = 'my text to add' $(document).ready(function(){ $('#flashHere').flash(null, null, function (htmlOptions){ $(.hello).append(strToAdd) }); }); // END DOCUMENT READY /script In the end what I would really like to do is replace one div with one other if flash is not found, this will help me make an iPhone friendly version of a site with a lot of flash video on it. Any suggestions or help would be great!
[jQuery] Re: jquery.Flash plugin
Got the above working with slightly different code. Also realized my non flash content had to be displayed then my flash content would be displayed only if flash was present. My code is below. I do not recommend this method since I will have duplicate information on my site and it may interfere with the SEO rankings. In my header I have this -- script type=text/javascript $(document).ready(function(){ $.ajaxSettings.cache = false; //This is for IE. // uncomment the alert to actually see the content go from non flash to flash. //alert('Once clicked you will see the flash version of the site!') $('#flashHere').flash(null, null, function (htmlOptions){ $.get('my_flash.html',{},function(data){ $('.hello').html(data); }); }); }); // END DOCUMENT READY /script my_flash.html is a page with all my flash stuff on it that will remove my content in the div with an ID of flashHere found in the body of my site In my body I have the following div -- div id=flashHere class=entry hello I am non flash content and I am seen by all!br Once flash is noticed my flash replace stuff goes here! Not a bad idea. Too bad I am not very smart and did not realize this sooner. /div Hope this helps out other people. John