Project

General

Profile

using JQuery

Added by Mohammed Rashad over 13 years ago

How to use JQuery function in Wt using doJavaScript()

I am using a gritter notification which is a jquery plugin. Is there anything in Wt similar to this

http://boedesign.com/demos/gritter/

here is my wt code

WApplication::instance()->require("http://www.google.com/jsapi");

WApplication::instance()->require("js/jquery.min.js");

WApplication::instance()->require("js/jquery.gritter.js");

stringstream strm;

strm << "$.gritter.add({title: 'This is a regular notice!',text: 'This will fade out after a certain amount of time.',sticky: false,time: ''});";

doJavaScript(strm.str());

nothing is shown when executing this code

What I am missing??

please help


Replies (2)

RE: using JQuery - Added by Koen Deforche over 13 years ago

Hey,

That should work, except you don't need the google jsapi (?).

The attached test case is almost the same as yours and works for me.

Regards,

koen

test230.cc (732 Bytes) test230.cc

RE: using JQuery - Added by Mohammed Rashad over 13 years ago

thanks indeed

+1 for test case :)

    (1-2/2)