Hi, Koen.
I managed to run slimbox (it's lightbox clon)
after binding the above handler on signal "clicked" of Wt::WImage widget:

void GenericCatalogEntry::on_image_click(boost::tuple<std::string, 
std::string> t)
{
    Application::instance()->doJavaScript("jQuery.slimbox('" + 
t.get<0>() + "','" + t.get<1>() + "')");
}

Slimbox JS library has been loaded with Wt::WApplication::require().

Somehow none of the slimbox, lightgallery, lightbox doesn't launch via 
"rel" attribute for anchor.
But in DOM inspector it's seen that attribute has been initialized 
correctly (after my patch).

Koen Deforche wrote:
> Hey Andrii,
>
> 2009/5/27 Andrii Arsirii <[email protected]>:
>   
>> Does anyone has experience in this?
>>
>> I tried lightgallery
>> (http://code.google.com/p/lightgallery/wiki/InstallationInstructions).
>>
>> I have:
>> 1) added setRel() method to wt
>>     
>
> I wasn't aware of this attribute. Your patch seems fine!
>
>   
>> 2) loaded library from application constructor:
>>  require("lightgallery/lightgallery.min.js");
>>  useStyleSheet("lightgallery/skins/default/style.css");
>> 3) initialized library with
>>  doJavaScript("lightgallery.init();")
>>
>> But nothing works (seems library is not loaded at all when it's needed). No
>> java script errors in console.
>>     
>
> I cannot think of an obvious reason why this doesn't work, at least
> the library should be loaded: you can inspect this using firebug.
> A reason why it does not seem to work could be that there is a timing
> issue with DOM being built and lightgallery.init() being called ?
>
> Regards,
> koen
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
>   


-- 
Andrii Arsirii
Streamco
http://streamco.org.ua


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to