Richard Knop
Richard Knop

Reputation: 83695

Delete cache for a single tooltip on click event

I am using the BeautyTips plugin for tooltips on my website.

I am caching all ajax content that goes into my tooltips. What I want to do is delete a cache for a single element after a click action.

So:

$("#SomeId").click(function(){
    /// now clear a tooltip cache but of only single tooltipped element. how to do it?
});

Upvotes: 1

Views: 665

Answers (1)

mekwall
mekwall

Reputation: 28974

I'm not an avid user of BeautyTips, but what I could see from the source code is that the content cache is stored per url in the body element with .data() in the following format: btCache-urlwithoutdots

So removing cached content should be doable with the following line of code:

$(document.body).removeData("btCache-wwwexamplecom/foo/bar");

Note that I have not been able to test it out so I can't promise it will work.

Upvotes: 1

Related Questions