Home: Perl Programming Help: Beginner:
Need help with a script which uses a jquery plugin



terrykhatri531
User

Sep 8, 2014, 2:49 AM


Views: 3331
Need help with a script which uses a jquery plugin

Hi Chris,

I have been desperately trying to configure a jquery plugin in my perl application for a couple of days but no luck, I am not getting it configured right what it does is just to display an icon instead of an image gallery, I am getting no errors in firefox/firebug console so assuming that I am missing something which is not properly coded which I am unable to troubleshoot, therefore I will really really appreciate if you can kindly have a look at it.



I have created an html prototype for you with all the files required so you can test it yourself and rectify the code.



The tar.gz archive is attached herewith - Sorry cannot attaché the tarball as it exceeds the given limit, therefore kindly download it from : http://tonyalepski.heliohost.org/test.tar.gz

The way its supposed to work is linked below : https://0.s3.envato.com/files/17654472/content/index_playlistRightInside.html and check out the MISTIQUE_KEN BURNS category.



In my case I have just one category.



I am pretty sure you will get it to work in minutes !!!



Many many thanks Chris !!



Terry


(This post was edited by terrykhatri531 on Sep 8, 2014, 11:54 AM)


Zhris
Enthusiast

Sep 8, 2014, 5:35 PM


Views: 3307
Re: [terrykhatri531] Need help with a script which uses a jquery plugin

Crossposted on jQuery.

I receive the same errors via console as jakecigar. My initial attempts to fix the issue were unsuccessful. Did the plugin come with any documentation, or did you just copy boilerplate code?

Chris


terrykhatri531
User

Sep 9, 2014, 4:16 AM


Views: 3241
Re: [Zhris] Need help with a script which uses a jquery plugin

Hi Chris,

The help document that came with the package is attached.


Rgds.

Terry


(This post was edited by terrykhatri531 on Sep 9, 2014, 10:53 AM)
Attachments: help.html (127 KB)


Zhris
Enthusiast

Sep 9, 2014, 10:58 AM


Views: 3211
Re: [terrykhatri531] Need help with a script which uses a jquery plugin

I'll have another look at it when I can, you will likely receive better help with jquery stuff at the jquery forum though (I only really know what I need to know).

I normally use Firefox Firebug, but I don't have firefox installed on this laptop therefore used Chrome's inspector. With either, javascript errors should be visible under the console tab (see attached).

Chris


(This post was edited by Zhris on Sep 9, 2014, 11:02 AM)
Attachments: chroinspecjserr.png (71.5 KB)


terrykhatri531
User

Sep 9, 2014, 12:16 PM


Views: 3202
Re: [Zhris] Need help with a script which uses a jquery plugin

Hi Chris,

I got it to work !! Thanks very much for your efforts though !

Rgds

Terry


Zhris
Enthusiast

Sep 9, 2014, 12:36 PM


Views: 3198
Re: [terrykhatri531] Need help with a script which uses a jquery plugin

Nice one,

Will you share what fix you applied for peace of mind, unless of course you just stripped out the problematic code.

Chris


terrykhatri531
User

Sep 10, 2014, 9:08 AM


Views: 3091
Re: [Zhris] Need help with a script which uses a jquery plugin

Hi Chris,

The plugin that I was using was minified with harcoded paths to certain directories which did not match my layout structure so what I did was to take the source and modified the paths to the directories to match mine, that's it.



I have converted the html to perl but all the html stuff is under double-quotes like qq! <html> !; which does not look professional, you mentioned about using a template for html source and I would like to do that so I will appreciate if you can site me an example how to do that to keep the html stuff in template and perl/cgi under perl script the way you have shown me the benefits of indenting the code, or if you happen to know some good links that will be great !!

Thanks much !!

Terry


FishMonger
Veteran / Moderator

Sep 10, 2014, 9:29 AM


Views: 3086
Re: [terrykhatri531] Need help with a script which uses a jquery plugin

A good choice for an entry level template module would be HTML::Template.
http://search.cpan.org/~wonko/HTML-Template-2.95/lib/HTML/Template.pm

I'm currently developing an app using the Dancer2 web framework and Template::Toolkit for the template engine.
http://search.cpan.org/~sukria/Dancer2-0.10/lib/Dancer2/Cookbook.pod
http://search.cpan.org/~abw/Template-Toolkit-2.25/lib/Template.pm