Questions tagged [jquery]

jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.[2] It was released in January 2006 at BarCamp NYC by John Resig. It is currently developed by a team of developers led by Dave Methvin. Used by over 60% of the 10,000 most visited websites,[3] jQuery is the most popular JavaScript library in use today.

Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

Add click event on bootstrap tab?

How to add an onClick event on Joomla bootstrap tabs. https://api.joomla.org/cms-3/classes/JHtmlBootstrap.html echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'monday')); echo ...
1 vote
2 answers
1k views

Bootstrap Dropdown Navigation Toggle Not Working with native Joomla jQuery

I'm trying to implement a Bootstrap menu with a toggle dropdown on a Joomla site. Got most of it working except for the toggle isn't working...Looking at inspect tool when .dropdown element is ...
2 votes
1 answer
244 views

Disable script in head if path to script has a full url?

I found this code from this topic: Disable script loading in head $doc = JFactory::getDocument(); $dontInclude = array( '/media/jui/js/jquery.js', ); foreach($doc->_scripts as $key => $script){ ...
0 votes
1 answer
556 views

Call a function using AJAX from a Joomla-View to retrieve data from the DB

i have coded a little component to administrate books for a histroy club. I added some views to deiplay different tables with book date. So far everythign works. In fact the DB access and the building ...
1 vote
1 answer
984 views

jQuery scripts not working in Joomla 4 template

I am trying to upgrade my Joomla 3 website to Joomla 4. One of the issues I am facing is that none of the jQuery code in my template's index.php file is working. Does jQuery not get loaded ...
1 vote
1 answer
85 views

Legacy component + jquery + SEO = 404

I have a legacy joomla 4 component that saves something back to the server using jquery. It works fine with SEO turned off, but I get a 404 error with SEO turned on. The URL parameter for the jquery ...
1 vote
0 answers
38 views

Is there a JS event that gets fired when a subform row got moved / deleted?

When Adding a subform row (in the backend) it fires the "subform-row-add" event that can be observed with JS. I've tried default namings like "subform-row-moved", "subform-row-...
0 votes
0 answers
54 views

How to resolve the Internal Server Error with my custom components calendar in Joomla 4?

I try to make a custom calendar in my custom component in Joomla 4. For that I write a code who connect to a database and retrieve the data. For that I have 3 files : default.php, ...
1 vote
1 answer
434 views

Change JS/jQuery Scroll function based on screensize

I'm working on a J3 site which I've had to use quite a bit of custom html/js code. I've reached a 'can't see the wood for the tree's moment'. Joomla and PHP I can do, jQuery - my old brain doesn't ...
0 votes
1 answer
712 views

How to remove CSS and JS from Joomla 4 header?

I want to properly remove CSS and JS links from Joomla 4 header For example I did not want: <link href="/newer/media/vendor/fontawesome-free/css/fontawesome.min.css?5.15.4" rel="...
0 votes
2 answers
62 views

Activate jquery with javascript

I'd like to create a Joomla module, but it requires jquery to operate, the problem is whether Jquery is activated (imported) before is still unknown, import jquery through <script src> may cause ...
11 votes
3 answers
2k views

Return JSON using the Joomla Framework

I have started building a web application using the Joomla Framework. It consists of a simple web page which will be displayed in an iFrame along with an API that will be used to update the content ...
1 vote
1 answer
473 views

Customizing filters layout from joomla.searchtools.default for list view of custom component

In Joomla 4, there is the layout joomla.searchtools.default for the filters in a list view that you can see everywhere in the BackEnd. In a list view of my custom component (FrontEnd), I managed to ...
1 vote
2 answers
256 views

Joomla Subform adding row, the selector event is not fired if I change the value of the select element?

I have a subform which is working perfectly itself. If I add a new row (+), I have add the function as mentioned on joomla subform documentation: jQuery(document).on('subform-row-add', function(event, ...
2 votes
2 answers
4k views

Loading the built-in jQuery in Joomla 4 if it does not exist

Tell me please. How to load jQuery in Joomla 4 if it has not been loaded yet?
1 vote
1 answer
240 views

Add a class attribute to body tag when a user is logged in

I want Joomla to add a class like "loggedIn" to body classes, when a user is logged in the page, in order to use this class and make specific css changes for logged in and non-logged in ...
0 votes
4 answers
90 views

Can't get my JS to work on a simple link

I just launched my website : https://lise-whales.com/ Joomla 3.9.28 Astroid Framework 2.5.2 Astroid Template One 1.3.2 I want to use Featherlight lightbox with JS script So I past before the </...
1 vote
1 answer
378 views

Issues with cookie bot on Joomla 3x and jQuery

I am trying to install a cookie library on a site. We are getting jQuery is not defined from the cookie library. Presumably because it is being loaded before the jQuery library. The jQuery library is ...
4 votes
1 answer
3k views

Is it possible to load a newer jQuery version?

Is it possible to override the native JHtml::_('jquery.framework') loaded by Joomla, using some line of php? I understand I could replace this line in my template. But since I am using a template ...
1 vote
2 answers
597 views

Controller method does not get data passed through jQuery.ajax()

I am developing a Joomla component. In javascript I use jQuery.ajax() for making a (php) controller method put data (from javascript) into the database. However, after installing the component on one ...
0 votes
1 answer
95 views

Looking for a way to use jQuery Chosen in a Fabrik dropdown selection

The Fabrik Dropdown (and all other SELECT) plugins present results as a standard SELECT html format. What I am looking for is a quick way of replacing this with a jQuery CHOSEN field to improve the ...
10 votes
5 answers
5k views

Joomla 3.4.1 how to delete JCaption, called with jQuery?

I want to delete JCaption from head, jquery and jcaption file i deactivated with following methods: unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery.min.js']); unset($doc->_scripts[...
1 vote
1 answer
49 views

Joomla trigger event when element in field of “filelist” type is selected

I am struggling since a few days with following problem. Using Joomla 3.9.2x and query 3.5.1. I am trying to display a modal "window" when an item is selected in a Joomla filelist field. I ...
1 vote
2 answers
2k views

How to solve chosen/jquery/frontend violation

I am developing a component for a Joomla frontend site and when I include JHtml::_('formbehavior.chosen', 'select'); in the template form, I get this message in JavaScript Chrome Console (Mac OS X): [...
0 votes
1 answer
661 views

Owl Carousel not working in Joomla, why?

I am making a custom module using Owl Carousel 2. For some reason it just doesn't work in Joomla. The html structure is there in frontend, but the owl carousel is not displayed. Unfortunatly, there ...
2 votes
1 answer
1k views

Update List field rendering after ajax update

for one of my extensions i need to update a select list by ajax. the whole ajax call is working and i got the new option vars for the select list. I add those options in the ajax's "success" function ...
0 votes
1 answer
27 views

Joomla 3 Article Gallery View stopped displaying articles

I have a website with some menu items using the Article / Gallery View option to display a list of articles in blog style. It has been working perfectly for a few years now, but it stopped working in ...
-1 votes
1 answer
29 views

How do I find the first NON bootstrap class ancestor of my current module position?

Not sure I'm wording this right so please forgive me. I'm working on a situation where I want to apply the background to the 1st NON .container ancestor of my current module. So, for example.. <...
1 vote
3 answers
849 views

Joomla calendar popup does not appear when loaded by ajax

I'm loading a calendar field via jquery ajax. When I click the calendar button nothing happens. The calendar popup is not showing. in model.php $tr = "<td>" . JHTML::_('calendar', '2015-09-09'...
2 votes
2 answers
534 views

How do you assign jQuery scripts to an article?

I'm working on adding a simple feature to a single Joomla article. Editing the article itself is necessary in this case, I can't modify the template files (or add the JS to the entire site). In the ...
5 votes
3 answers
2k views

How to trigger javascript on a date selection on JHTML::_calendar

I am using the below code to show a calendar in my form. echo JHTML::calendar("", "timetable_slot_date", "id_timetable_slot_date") What I need is to implement an onChange or onDateSelect javascript (...
0 votes
0 answers
86 views

Joomla 3. Dependent select in custom component

I make a component for Joomla 3. It has two lists "City" and "Place". How can I make the "Place" list update without reloading the page when I select "City"? <field name="cityid" type="sql" class="...
1 vote
2 answers
261 views

Chronoforms 6: jQuery.G2 is undefined

I have an issue with Chronoforms6. I'm using jQuery in my template and include a Chronoforms form in an article by using this shortcode {chronoforms6}myForm{/chronoforms6}. The issue is a this error ...
2 votes
2 answers
134 views

Link to Page & Pre-Filter Portfolio Items

Joomla 3.9.10 I am using this template. I would like to create a link on my home page that when clicked, will take the user to the portfolio page and display a pre-selected tab.. For example my link ...
1 vote
3 answers
4k views

How can I select the IDs of a category and all its (n levels) subcategories?

Beside the parent category, I would like to recursively collect all of its child rows. (Pseudo code) SELECT IDs FROM #_categories WHERE parent = father As an alternative, SELECT IDs WHERE the first ...
1 vote
1 answer
72 views

How to pass a php array to javascript array/object with non-sequential keys

I'm trying to pass a php array to javascript, but the array has non-sequential keys. Here is a portion of the array: Array ( [1812] => Array ( [RecID] => 1 [...
1 vote
1 answer
1k views

SP Smart Slider doesn't load

If you check this webpage: http://www.benaventegrow.com/ I don't know why, but SP Smart Slider module doesn't load. It must be a JQuery conflict. I have read about the .noConflict() function, but it'...
1 vote
2 answers
849 views

jQuery global array showing as undefined

I have set a couple of global variables on page load as follows: jQuery(document).ready(function() { console.log("Onload PHP vis_options:"+JSON.stringify(<?php echo json_encode($...
0 votes
0 answers
187 views

Adding li to ul causes all li to end up outside the ul

I have a page that has the following uls on it: <div id="team1" class="team_name">Desperate Housewives <ul class="sortable ui-sortable" id="sortable_1" ...
0 votes
1 answer
1k views

Setting a Start/End time to J2store Date picker field

I'm looking for a bit of help with regards to a Date/Time (Date Picker) field in J2store. A friend of mine has set up the field no problem, however, they want to restrict the times that can be ...
1 vote
1 answer
282 views

iFrame with javascript

I would like to summarize my problem: I need to obscure the source of the iframe from the source code. To do this I have to use javascript code and obfuscator. By inserting the following obfuscated ...
0 votes
1 answer
315 views

jQuery is not loading in new window in Joomla

jQuery is not loading in new window in Joomla I have a page default.php in component module. default.php contains defined('_JEXEC') or die('Restricted access'); $document = JFactory::getDocument(); ...
1 vote
1 answer
390 views

Autoscroll a Bootstrap Row/Columns in Joomla Module

I am using a K2 Content module to display 'Sponsors' of an event. You can see an example here I have managed to set this up so that the columns can be scrolled manually using a mouse drag but ideally ...
1 vote
1 answer
980 views

Is there a method to sort the FormBehavior.chosen output in Joomla 3?

The chosen multiple select result outputs always in ascending order of the array, regardless of the selected order. I couldn't find information related to ordering in the JHtml attribute array. I ...
2 votes
2 answers
756 views

Populate Joomla Calendar field by jQuery not working

I am trying to populate the calendar form field by using jQuery based on the values of other field. I am using JHTML::calendar for this. When the value is set via php everything works fine for me. But ...
0 votes
4 answers
2k views

About jquery and $document->addScriptDeclaration($js) by developing a plugin

I seem to be having an issue when using jQuery in my plugin, which results in a blank page. When I delete the last line $document->addScriptDeclaration($js);, the site display but the code doesn't ...
0 votes
1 answer
3k views

Using jQuery .load and console.log not working

I have a page that I'm loading through jQuery's .load. The page loads fine, but if I attempt to write to the console.log it does not work? Any thoughts on what I might be missing? If I use ...
3 votes
1 answer
1k views

Send array from javascript to php by POST in Joomla 3.x

im trying to send an array from javascript to Joomla 3.x php file. var options = ['foo', 'bar']; $.post('index.php?option=component&view=componentview&Itemid=123&tmpl=component&...
0 votes
1 answer
60 views

SPpagebuilder accordion +Fetch as Google problem

Recently i purchase theme based on SP PageBuiler and description says it is included as Pro version. But SPpagebuilder forums required their subscription witch i of course don't have... And theme dev ...
0 votes
1 answer
364 views

JQuery error after joomla 3.8.10 update

Hello I get this jquery error after my last kunena update to 3.8.10: "Uncaught TypeError: $(...).insertAtCaret is not a function". You can see the complete error in the following capture: This error ...