You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by rawe <ra...@dachser.com> on 2010/10/05 14:46:45 UTC

Modal Window and Fade In effect

Hello everybody,

I'm looking for a solution opening a Wicket modal window using fade in
effect.

I tried some jQuery code but without success.

Maybe someone has some example code or hints.


here is my example:


jQuery-Code

< script type="text/javascript">
					$(document).ready(function() {			
			$('#terms').click(function() {
			      $('#dlgTerms').fadeIn('slow', function() {
			       alert("FadeIn complete!");
			      });
			    });
					
		});



Markup:





 

    &#8226; Frankaturen 



Code:


ModalWindow dlgTermsAdmin = new ModalWindow("openTermsAdminDlg", "myTitle",
this);

AjaxLink lnkTermsAdmin = new AjaxLink("lnkTermsAdmin") {
	@Override
	public void onClick(AjaxRequestTarget target) {
		dlgTermsAdmin.show(target);
	}
};
		
lnkTermsAdmin.setMarkupId("terms");
lnkTermsAdmin.add(dlgTermsAdmin);
add(lnkTermsAdmin);





The MarkupId of my ModalWindow is set to "dlgTerms"


Thanks for help!


Ralph

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-Window-and-Fade-In-effect-tp2955922p2955922.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Modal Window and Fade In effect

Posted by Altuğ Bilgin Altıntaş <al...@gmail.com>.
are you sure dlgTerms is markup id; please look at your generated html and
check it if id is dlgTerms or something like dlgTerms17...

my advice is to generate jquery code on the fly using actual model's markup
id. After that you can stream this jquery code before model window is
rendered - beforeRendered ..

Altug



2010/10/5 rawe <ra...@dachser.com>

>
> Hello everybody,
>
> I'm looking for a solution opening a Wicket modal window using fade in
> effect.
>
> I tried some jQuery code but without success.
>
> Maybe someone has some example code or hints.
>
>
> here is my example:
>
>
> jQuery-Code
>
> < script type="text/javascript">
>                                        $(document).ready(function() {
>                        $('#terms').click(function() {
>                              $('#dlgTerms').fadeIn('slow', function() {
>                               alert("FadeIn complete!");
>                              });
>                            });
>
>                });
>
>
>
> Markup:
>
>
>
>
>
>
>
>    &#8226; Frankaturen
>
>
>
> Code:
>
>
> ModalWindow dlgTermsAdmin = new ModalWindow("openTermsAdminDlg", "myTitle",
> this);
>
> AjaxLink lnkTermsAdmin = new AjaxLink("lnkTermsAdmin") {
>        @Override
>        public void onClick(AjaxRequestTarget target) {
>                dlgTermsAdmin.show(target);
>        }
> };
>
> lnkTermsAdmin.setMarkupId("terms");
> lnkTermsAdmin.add(dlgTermsAdmin);
> add(lnkTermsAdmin);
>
>
>
>
>
> The MarkupId of my ModalWindow is set to "dlgTerms"
>
>
> Thanks for help!
>
>
> Ralph
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Modal-Window-and-Fade-In-effect-tp2955922p2955922.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>