This content has been marked as final.
Show 4 replies
-
1. Re: panelMenu isn't working with javascript
nbelaevski Mar 2, 2009 3:15 PM (in response to argonist)Hello Manu,
RF is bundled with jQuery script, please try using it:<a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js" />
-
2. Re: panelMenu isn't working with javascript
argonist Mar 3, 2009 9:21 AM (in response to argonist)Hello nbelaevski,
thx, but the dynamic element isn't working with that loadScript.
The element should be resized after clicking to full size to play the video.
code:<head> ... ... <a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js" /> <a4j:loadScript src="js/flowplayer-3.0.6.min.js"/> <script> $(function() { $f("a.player", "swfplayer/flowplayer-3.0.7.swf", { // perform custom stuff before default click action onBeforeClick: function() { // unload previously loaded player $f().unload(); // get wrapper element as jQuery object var wrap = $(this.getParent()); // hide nested play button wrap.find("img").fadeOut(); // start growing animation wrap.animate({width:640, height:480}, 500, function() { // when animation finishes we will load our player $f(this).load(); }); // disable default click behaviour (player loading) return false; }, // unload action resumes to original state onUnload: function() { $(this.getParent()).animate({width:52, height:37}, 500, function() { // make play button visible again $(this).find("img").fadeIn(); }); }, // when playback finishes perform our custom unload action onFinish: function() { this.unload(); }}); }); </script> </head> <body> ... ... ... <div class="row"> <a href="http://example/movies/herzlichwillkommendsl.flv" class="player" > <img src="images/hand.gif" width="52" height="37" /> </a> </div> ... ... ... </body> Manu
-
3. Re: panelMenu isn't working with javascript
nbelaevski Mar 3, 2009 10:07 AM (in response to argonist)Please try using jQuery() instead of $() with the bundled version of jQuery.
-
4. Re: panelMenu isn't working with javascript
argonist Mar 4, 2009 8:02 AM (in response to argonist)Thx. I found the documentation http://docs.jquery.com/Using_jQuery_with_Other_Libraries to solve my problem.
I prefer another variable to $.