• home
  • forum
  • my
  • kt
  • download
  • Shockwaves in Wordpress with jQuery Flash

    Author: 2009-04-17 08:45:54 From:

    The other day I had to figure out how to load a shockwave into a wordpress post, I decided to do it with jQuery jFlash. I always edit in HTML mode so I could just paste the following in my article:

    <script type="text/javascript" src="http://www.prodevtips.com/jquery.flash.js"></script> 
    <script type="text/javascript"> 
    $(document).ready(function(){  
      $("#flash").flash({  
        src: "http://www.prodevtips.com/wp-content/uploads/2008/08/tut.swf",  
        width: 700,  
        height: 500,  
      });  
    }); 
    </script> 
    <div id="flash"></div>

    Note the absolute URLs, I have no idea what relative path to use for this stuff in Wordpress. It’s safer and easier to just go with the whole thing. This works for me because I’ve already included the base jQuery script at the top of my page, you need too, check out the jQuery homepage for more info.

    Also note the use of double quotes (). The example I copy pasted first was using single quotes () but Wordpress filters them out so only doubles are good here.

    discuss this topic to forum

    relation tutorial

    No information

    Category

      AJAX (71)
      Content Management (13)
      Cookies (6)
      Date and Time (17)
      Development (18)
      DHTML (23)
      Forms (10)
      Frequently Asked Questions (3)
      Image Display (14)
      Introduction to Javascript (11)
      Links and Buttons (8)
      Menus (2)
      Miscellaneous (24)
      Mouse Tricks (3)
      Navigation (13)
      Randomizing (6)
      Security (5)
      Text Effects (10)
      User Authentication (2)
      User Information (5)
      Windows and Frames (9)

    New

    Hot