Questions tagged [javascript]

JavaScript is a dynamically-typed language commonly used for client-side scripting. Unless a tag for a framework/library is also included, a pure JavaScript answer is expected.

Filter by
Sorted by
Tagged with
8
votes
3answers
1k views

Optimizing frontend load, how do I properly combine and compress my JS?

My website for an enterprise client has approximately 90 assets that download on load, 35 or so are JS files. Even "optimizing" extensions that are made for Joomla only seem to get me down to 31 or ...
5
votes
2answers
837 views

Get access to php variable in Joomlas addscriptdeclaration for Javascript

How do I get access to php variables in Joomlas approach to integrate Javascripts with addScriptDeclaration? $document = JFactory::getDocument(); $variable = "test"; $document->...
3
votes
4answers
3k views

Dynamic JS and CSS combining without JCH Optimize

I know JCH Optimize is a very good plugin to compress and minify JS and CSS files but I noticed it also adds time to the page to be rendered. For example, WITHOUT JCH OPTIMIZE my TTFB is 200ms but ...
1
vote
1answer
706 views

Passing form value using Ajax

Referring to my previous Question jQuery Ajax for three drop down On page1) I will select dropdown Building (populating from db) and dropdown Floor (by Ajax call) then url will pass like: index....
5
votes
3answers
1k views

Load javascript script before </body> closing tag

I'm using $doc->addScript($path.'/js/script.js'); to load a Javascript file inside the head section. Is there any native way to load it in the bottom of the page, before the closing </body> ...
3
votes
2answers
4k views

Create custom module with javascript .js

I want to create a custom module to insert this .js javascript into my joomla site; joomla 3.x version http://bigspaceship.github.io/shine.js/ how can I do to create my custom text to appear into a ...
2
votes
4answers
2k views

How can I insert js scripts before </body>

I know this question is been asked again, but i tried their solution and it doesn't work so please don't rate it down. I have an authentication script (auth.js) that needs to be placed before the tag,...
2
votes
6answers
795 views

What's the correct way of adding code after the start of the body tag?

So, I've just recently added the Facebook Javascript SDK to my site to be able to enable a "like" button to my pages. Facebook recommends adding this right after the opening <body> tag. The ...
2
votes
1answer
656 views

Jquery marquee script not working in joomla?

I want to marquee some content divs with continues scrolling. I create a module then added the jQuery from this url: https://github.com/aamirafridi/jQuery. This code is working successfully in our ...
2
votes
1answer
138 views

Mixing PHP variables and JS variables in output

I am trying to develop a module to use JWPlayer's URL Toekn Signing (docs can be found here http://developer.jwplayer.com/jw-platform/reference/v1/content_signing.html) but I'm having an issue with ...
1
vote
1answer
54 views

Dynamically change ID of a href based on page class

I am looking to create an override of a component to add a button, however for each page that uses the override, I need the button to have a different ID as by clicking the button it will open a ...
0
votes
1answer
111 views

Video lazy loading skipping first video in every list

I'm using code found here: https://codepad.co/snippet/CtLEQDKX to lazy load the preview image for youtube videos within JComments. I have it working pretty good and looking like I want it to and it ...
0
votes
1answer
152 views

How to submit JForm form based on custom dropdown list value change

I'm working on a custom Joomla module. I have a JForm that contains multiple custom dropdown lists based on JFormFieldList. The form should be submitted when a value is selected from one of the custom ...
0
votes
1answer
828 views

jQuery Ajax for three drop down

Hi i have three dropdown, The first one populating value from database, Second and third will get their values by ajax call. And the problem is at first loading of the page when i'm selecting the ...