Yeah, $(document).ready will not re-run upon AJAX changes. I think
jQuery 1.3 has something called "live selectors" that kick in whenever
the DOM changes. Alternatively, you could just attach some Javascript to
the AjaxResponseTarget that initializes qtip for the new elements you're
adding.

jk

On Mon, Aug 31, 2009 at 11:43:58PM +0200, Mostafa Mohamed wrote:
> Hi i'm using the qtip jquery plugin to add tooltips, i use the following 
> script:
> 
> $(document).ready(function()
> {
>     $('a[title]').qtip(
>     {
>         show: {
>             when: 'click',
>             solo: true
>         },
>         position: {
>             corner: {
>                 target: 'topRight',
>                 tooltip: 'bottomLeft'
>             }
>         },
>         style: {
>             border: {
>                 width: 1,
>                 radius: 0,
>                 color: 'black'
>             },
>             padding: 10,
>             textAlign: 'center',
>             tip: true,
>             title: {
>                 'border-width': '1px',
>                 'border-style': 'solid',
>                 'border-color': 'black'
>             }
>         }
>     });
> });
> 
> this will take <a title="tooltip text">tip</a> and display a tooltip
> when the link is clicked.
> 
> However in one of my pages, when a user selects something from a drop
> down choice i add a fragment to the page using ajax. when i click on
> the tooltip link in this fragment the tooltip refuses to show. when i
> click on a non-ajax loaded tooltip link, it works just fine. i'm
> guessing it's because of $(document).ready. any clue as to how this
> could be solved? can wicket be of help in something like this?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

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

Reply via email to