Search and Top Navigation
#9595 closed bug (duplicate)
Opened October 10, 2013 07:05AM UTC
Closed October 10, 2013 11:58AM UTC
Last modified October 10, 2013 02:13PM UTC
Tooltip doesn't change on ajax call
Reported by: | camacici | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.tooltip | Version: | 1.9.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi,
I need to change the title attribute when I click the element using an ajax call, but the tooltip still remains the same.
I found a workaround, but I don't like it, it's a hack ...
I must hide the element before the ajax call and when the call has ended I can change the title and then I must re-show the element. It's run but I see the element disappearing for a short while of time.
You can found an example here: http://jsfiddle.net/9JgZT/2/
Best regards,
Michele
Attachments (0)
Change History (4)
Changed October 10, 2013 11:15AM UTC by comment:1
Changed October 10, 2013 11:58AM UTC by comment:2
resolution: | → duplicate |
---|---|
status: | new → closed |
Duplicate of #8925.
Changed October 10, 2013 01:29PM UTC by comment:3
tj.vantoll,
I know that in http://jsfiddle.net/tj_vantoll/M9SXe/ there is an example of code working ... that is my code! The code used in http://jsfiddle.net/9JgZT/2/ (my code) is the same in http://jsfiddle.net/tj_vantoll/M9SXe/ (your code)!
And last I don't understand why the code $div.tooltip("option", "content", "changed!") works fine in your last example (http://jsfiddle.net/tj_vantoll/Tgg8Y/) but in my code fails; the only difference is the initialization of tooltip: $(document).tooltip() VS $("[title]").tooltip()
Changed October 10, 2013 02:13PM UTC by comment:4
Replying to [comment:3 camacici]:
tj.vantoll, I know that in http://jsfiddle.net/tj_vantoll/M9SXe/ there is an example of code working ... that is my code!
I added
url: "/echo/json"to the ajax calls so they would work in jsFiddle.
And last I don't understand why the code $div.tooltip("option", "content", "changed!") works fine in your last example (http://jsfiddle.net/tj_vantoll/Tgg8Y/) but in my code fails; the only difference is the initialization of tooltip: $(document).tooltip() VS $("[title]").tooltip()
The difference is explicitly creating the tooltip widget on the element vs using event delegation. If you need further assistance please use the forums or Stack Overflow.
Hi Michele,
Thanks for taking the time to contribute to the jQuery UI project. Here's a test case that shows the AJAX requests working - http://jsfiddle.net/tj_vantoll/M9SXe/.
Someone else on the team will have to correct me if I'm wrong, but I believe that you cannot use delegated tooltips and get the ability to change the content dynamically.
You can explicitly create tooltip widgets and this works fine - http://jsfiddle.net/tj_vantoll/Tgg8Y/.