New answer Shiny Awesomer!
All my previous answers suck! What you really need to do is fire the click event on the close button.
$K(".kGrowl-notification .close").trigger("click");
Just release this javascript when you respond with a web event.
Best sample application:
ruleset a60x469 {
meta {
name "better-close-notify-example"
description <<
better-close-notify-example
>>
author "Mike Grace"
logging on
}
rule put_notify_on_page {
select when pageview ".*"
{
notify("Hello","I'm on your page") with sticky = true;
emit <|
setTimeout(function() {
app = KOBJ.get_application("a60x469");
app.raise_event("clear_notify");
}, 2000);
|>;
}
}
rule clear_notify {
select when web clear_notify
{
emit <|
$K(".kGrowl-notification .close").trigger("click")
|>;
}
}
}
OLD CRAPPY ANSWER
There are several ways to do this.
< > :
set_element_attr
set_element_attr(".kGrowl", "style", "display:none");
[] ()
emit <|
$K(".kGrowl").remove();
|>;
[]
emit <|
$K(".kGrowl").hide();
|>;
replace_html ()
replace_html(".kGrowl","");
:
ruleset a60x468 {
meta {
name "example-clear-notify"
description <<
example-clear-notify
>>
author "Mike Grace"
logging on
}
rule put_notify_on_page {
select when pageview ".*"
pre {
button =<<
<button id="clear-notify">Click me to clear the notify</button>
>>;
}
{
notify("Hello","I'm on your page") with sticky = true;
append("body", button);
emit <|
$K("#clear-notify").click(function() {
app = KOBJ.get_application("a60x468");
app.raise_event("clear_notify");
});
|>;
}
}
rule clear_notify {
select when web clear_notify
{
replace_inner(".kGrowl","");
}
}
}
: = > http://mikegrace.s3.amazonaws.com/forums/stack-overflow/example-clear-notify-dev_bookmarklet.html
example.com:

:
