Question

I am including the required files then calling zclip with this code, I tried moving the order of js files around and including in footer but not working. I get this error when i try to run this code in firebug console as a test.

TypeError: undefined is not a function

this tells me that the zclip javascript file is not working, I am running drupal 7 with jquery 1.4.4

$('a.tocopy').zclip({
        path:'/sites/all/themes/my_theme/js/ZeroClipboard.swf',
        copy:$('#mini-panel-track_node_assets .view .view-content').text()
    });
$('a.tocopy').zclip({
        path:'/sites/all/themes/my_theme/js/ZeroClipboard.swf',
        copy:$('#mini-panel-track_node_assets .view .view-content').text()
    });
Was it helpful?

Solution

that's because zclip function is not loaded and jQuery does not know the function. first load jQuery and then load the plugin.

OTHER TIPS

Сhange line 288:

$(this.domElement).data('zclipId', 'zclip-' + this.movieId);

to

jQuery(this.domElement).data('zclipId', 'zclip-' + this.movieId);

upd: now it's fixed: https://github.com/patricklodder/jquery-zclip/blob/master/jquery.zclip.js line 296:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top