I use the following script in my head:
$(function() {
$('#file-tree').fileTree({
root:'/',
script: "${createLink(controller:'media',action: 'generateFileList')}"
}, function(file) {
alert(file)
});
})
When i put my element inside the ZK window component with the div tag, seems like the jquery function() is never called and nothing happend
But outside a ZK component, there is no problem the jquery file tree is display.
I tried the zk way for jquery ,replacing my script with :
zk.afterMount(function() {
jq('#file-tree').fileTree({
root:'/',
script: "${createLink(controller:'media',action: 'generateFileList')}"
}, function(file) {
alert(file)
});
})
But this is still not working.
Am i missing something ? Is there a "special way to integrate some Jquery " ?
I am using: grails 2.1.1
zkui 0.5.4
jquery(the grails plugin)1.8.0
Hi !
I'm trying to integrate the Jquery File Tree from http://www.abeautifulsite.net/blog/2008/03/jquery-file-tree/ into my ZK UI project, and i've got some problem.
I use the following script in my head: $(function() { $('#file-tree').fileTree({ root:'/', script: "${createLink(controller:'media',action: 'generateFileList')}" }, function(file) { alert(file) }); })
When i put my element inside the ZK window component with the div tag, seems like the jquery function() is never called and nothing happend
But outside a ZK component, there is no problem the jquery file tree is display.
I tried the zk way for jquery ,replacing my script with : zk.afterMount(function() { jq('#file-tree').fileTree({ root:'/', script: "${createLink(controller:'media',action: 'generateFileList')}" }, function(file) { alert(file) }); })
But this is still not working. Am i missing something ? Is there a "special way to integrate some Jquery " ?
I am using: grails 2.1.1 zkui 0.5.4 jquery(the grails plugin)1.8.0
Thanks !