Script Declaration in Image field

More
11 years 10 months ago #38827 by ggppdk
Here is the code in flexicontent helper that adds the file code.photoswipe.jquery-3.0.5.min.js
Code:
case 'photoswipe': if ($load_jquery) flexicontent_html::loadJQuery(); // Add swipe CSS / JS $document->addStyleSheet(JURI::root().'components/com_flexicontent/librairies/photoswipe/photoswipe.css'); $document->addScript(JURI::root().'components/com_flexicontent/librairies/photoswipe/lib/klass.min.js'); $document->addScript(JURI::root().'components/com_flexicontent/librairies/photoswipe/code.photoswipe.jquery-3.0.5.min.js'); $js = " jQuery(document).ready(function() { var myPhotoSwipe = jQuery('.photoswipe_fccontainer a').photoSwipe({ enableMouseWheel: false , enableKeyboard: false }); }); "; break;

You get a JS error ?
if you view the page HTML source and try to view file in the browser is the path correct? is the file missing?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38834 by brandonking
When I view the page HTML source,
I see photoswipe.css and klass.min.js are loaded successfully and of course, both of URL paths are correct. I just don't see code.photoswipe.jquery-3.0.5.min.js file.
And that's why I get following error in browser.
Uncaught TypeError: Object [object Object] has no method 'photoSwipe'.

I guess there is js conflict but can't figure out.
What I see the difference is that FC Extened Filter module is displaying incorrectly.

I will try to disable the module and see what happens.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38838 by ggppdk
Hello

i see, may you have jqueryeasy installed and it is removing the link?

if you have jqueryeasy , temporarily disable it and clean cache, does the file appear,

if the above is the case, then i will rename the file


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38840 by brandonking
Maybe you are right..coz I just tested it with different version of photoswipe (code.photoswipe-3.0.5.min.js file name without "jquery"), it works.
Anyway, I will try to disable jQueryEasy and let you know soon.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38841 by brandonking
Yeap, you are right, the jQueryEasy plugin was removing it.
I can see file name "code.photoswipe.jquery-3.0.5.min.js" with correct path.

But still problem remains.
I am getting following error in browser.

Uncaught TypeError: Object [object Object] has no method 'photoSwipe'


If I load file name "code.photoswipe-3.0.5.min.js", it works..
But, it's strange coz when I test it before it worked fine even with "code.photoswipe.jquery-3.0.5.min.js".

Did you change some code in this file?

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38848 by brandonking
It's now working with r1702.
Thank you.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.315 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save