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 c开发者_Go百科ache 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?
});
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.
精彩评论