Questions tagged [jquery]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
312 views

Filter Search Craft 3

Does anyone know or have a solution for a live search filter on the frontend for Craft. I can muscle through putting something together but if you have used something that is friendly enough, would ...
1
vote
1answer
3k views

Twig variables wont work in an include js file?

Im trying to put my code in a included theme.js file. It wont recognize my variables anymore. Working in .rain file within the html code: <script> jQuery(document).ready(function(){ var ...
1
vote
1answer
85 views

Ajax - How to create a Category through actionTrigger

I'm trying to create a jQuery/Ajax script to import data from a Wordpress API service and want to import the WP categories and tags into my database. I've managed to import the tags using an Ajax call ...
1
vote
1answer
68 views

Ajax - Create tag with custom ID programatically

I'm trying to create an jQuery/Ajax script to import data from a Wordpress API service and want to import the WP tags into my database. Everything works as expected when I loop through the data and ...
2
votes
1answer
56 views

jQuery Validate with Charge plugin

I'm trying to validate my form before the charge.js is triggered. I've decided to drop submit button in favour of a standard button and then use valid() method to process submit, so this is what I ...
0
votes
0answers
55 views

Freeform - jquery lookup to fill in addresses?

Looking for a plugin/script to autocomplete addresses in a form. I've got a couple of Freeform forms that ask for name, address, and a bunch of other data. And, I'd like it so that when a user ...
2
votes
1answer
1k views

JQuery $.ajax “:success” form logic with Plugin Controller?

I'm working on a simple plugin to facilitate front-end, anonymous lead generation forms submitted to Salesforce via cURL to it's Web-to-Lead servlet. The logic and data transfer are working (debug ...
1
vote
1answer
785 views

Simple AJAX search form

So I've been following the docs on how to create a search form in Craft and it works fine. But instead of having a results.twig page I would like to have just one index page and get all the results ...
1
vote
1answer
722 views

Error 404 When trying to POST to plugin Controller action

Before I dive into my problem, I do want to mention that I did do my due diligence and spent the last two days researching this problem, to no avail, so here it goes: So I'm getting the following ...
1
vote
0answers
54 views

Sprout Forms — Assign email selects LABEL to hidden field (jquery?)

I have a form that uses an email select form, where the label of each option is a department, and the value is the email or emails associated with that department. It's working fine, but the ...
1
vote
0answers
26 views

Add jplist script to Craft CMS

I found this useful search, sort and filter script http://jplist.com, which I have added to my website. It works perfectly until I realize that when my database grow to the point it slow the page down....
0
votes
1answer
111 views

Uploading local asset hangs and produces jQuery console error

So I have created an Assets field and am using it in one of my Entries. However, when I try to upload an image, it just keeps loading. I am getting the following console error: Any ideas why? Thanks!
2
votes
1answer
832 views

Complete working example for adding Craft Commerce items to the cart using AJAX and jQuery?

I'm using Craft Commerce and every time I click the Add to Cart button for a product, I'm redirected to the Cart page. This works okay, but I'd like to use AJAX (with jQuery v1.12.4) for this to save ...
0
votes
1answer
154 views

Commerce - Ajax returning obj.success even when failed

I've got a basic jQuery script that I use to update the cart, either through the actions /actions/commerce/cart/updateCart (if product isn't in cart yet) or /actions/commerce/cart/updateLineItem (if ...
3
votes
2answers
1k views

What is the correct way to include jQuery and jQuery UI in Craft?

I am wondering what is the correct way to include jQuery and jQuery UI in Craft? Thank you.
2
votes
3answers
24k views

Can I set a JS variable to a Twig output tag?

This came out of a previous question I need to set a variable of a tag group that I can reference in jquery for use with a plugin. I'm declaring this variable in a tag so my included js files can ...
3
votes
1answer
334 views

Load correct language Ajax

I'm having a problem with my ajax-loading when I'm on the english version of my page (My main language is Norwegian). I have a file named loadmore.html that I'm loading in on index.html when pressing ...
0
votes
1answer
1k views

Javascript loads before iframes

I have a couple of youtube iframes loaded into a channel entry. I also have a script running that resizes those iframes. It appears the script fires on window load but it appears that it fires before ...
0
votes
1answer
137 views

Date picker broken? [closed]

I just tried adding a date field to the bone stock Craft news template to try out the Live Preview and I'm getting a jQuery error: TypeError: undefined is not an object (evaluating 'a.currentDay=e("...
1
vote
1answer
615 views

How reference “Craft” js object in jquery scope

I have this function within my <script> tags: $('.btn').click(function() { var data = { title: "This is a title" }; Craft.postActionRequest('plugin/controller/action', data,...