Hot answers tagged

4

This is not actually EE-related - your scripts are in the wrong order. You're calling your site_script before you've loaded jQuery: <script type="text/javascript" src="{template_root}site_script.js"></script> <!-- Bootstrap JQuery--> <script src="https://code.jquery.com/jquery.js"></script> Reverse the order of those and you ...


4

I'm sure there are many ways to handle jQuery and EE but in my experience, for frontend work I tend to not use the jQuery provided with EE and just link in the version that I want to use. I always place the main jQuery link in an included footer or header and when necessary I'll add script tags that are specific to a page at the bottom of the page template ...


3

You're likely looking at the new docs that just went up, for EE 2.7 (released yesterday). Under EE 2.6.1, the parameter you want is called safecracker_head, not include_assets.


3

update looks like this task is not so simple as looks like - can't find where some notice even is registered (like for save custom field setting - looks like it is flashdata). I made a quick example using HubSpot Messaging + ee_notice replacement as combination of JS & hooks - CP Notice before Why just don't replace it with ext.? function cp_js_end( ...


3

Correct, just make the jQuery settings in the extension area to be a relative protocol: //ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js


3

Instead of trying to catch links on the page (which won't work if the customer uses their back button etc), you should use the empty_cart="yes" parameter on the product tag. https://exp-resso.com/docs/product_tag.html#empty_cart {exp:store:product entry_id="{entry_id}" empty_cart="yes"} <!-- form here --> {/exp:store:product} This means the cart ...


3

I found out what the issues are. The plugins simply haven't been updated for the most recent versions of EE. I use a different locations for my third_party folder. The url in most of these plugins look for the theme directory in the default location using this url: $this->EE->config->item('theme_folder_url').'third_party/plugin_folder_name But, ...


3

I've had this same problem. I solved it by simply using {if segment_1 == "abc"} statements to not include my jQuery on any page (segment) that had Channel Forms loading it's own jQuery. You can also overwrite the jQuery file that EE/Channel Form includes with your version of jQuery -- I have found EE's version to be slightly different to what I download ...


2

You don't mention if the text/code renders to the screen? If so you can debug in the browser inspector to find out the issue with paths or JS errors that may be preventing JQuery to run. So I'm assuming it's not rendering to the screen and based on the information you've provided, you have a "global" template group with a template called "footer". Try ...


2

You need to use pair tag for this: {gallery_items var_prefix="file"} {exp:ce_img:pair src="{file:url}" max_width="1080" itemprop="image"} <img data-original="{made_url}" class="lazyload" alt="{file:alt_text}" width="{width}" height="{height}" /> {/exp:ce_img:pair} {/gallery_items}


2

Not sure if the markup is entirely correct, but this works: $("#shipping_method").change(function(e) { $(this.form).submit(); });


2

So it looks like the issue was with the flexslider zip. I looked at the demo included in the zip and it has the same issue. I resolved the problem by grabbing the js file from the live demo page.


2

If it's just for a slider on the front-end, forget that you're even using EE and include jQuery as you would with any other platform. HTML5 Boilerplate recommends using the Google CDN with a local fallback, so you could throw this segment in your template: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <...


2

Do you have Process form data in Secure Mode? set to "Yes" in your Security and Session Preferences? That could be your issue. If you do, then EE will give a "The action you have requested is invalid." error message instead of using your template, and you'll never be able to get your POST data. I tried your code and it works as long as Process form data in ...


2

I have found (and apparently you have too!) that using one css file that 'imports' multiple is the way to go. I point WYGWAM to my wygwam-style.css file which includes: @import url("/css/reset.css"); @import url("/css/dynamic-content.css"); Reset.css is just a basic css reset that I use on the front-end of my site, so I figured it'd be best if it was ...


2

If you're getting HTTP 403, rather than the cross-domain error that most people get, then you might be hitting the incompatible session bug. Assets uses Ajax to do a lot of things and that is processed via Frontend by EE, so if your Control Panel Session and User Session types are not compatible, the Ajax requests will think you're not logged in. You cna ...


2

You're close. You'll need to have the return value on the empty cart form ('form.empty-cart' in my example below) change to the href for the anchor. $(document).ready(function(){ $('nav a').click(function(event){ event.preventDefault(); var link = $(this).attr('href'); $('form.empty-cart input[name="RET"]').attr('value', link); $('#store ...


2

I paid the $50 to have EllisLabs support look into it. In 30 minutes I had the solution. Turns out when EE updated it missed adding a row to the Actions table in the DB. Channel:form was looking for this action, but didn't find it. Producing this: <script type="text/javascript" charset="utf-8" src="http://dev.uscwm.org/?ACT={AID:Channel:combo_loader}&...


2

In your source code it looks like you have a ie conditional endif that doesn't have an opening which may be causing some errors <table> <tbody> <tr> <td class="imagefilter"> <div class="filter"> <div class="...


2

After much research it would seem the way to do it in my case is to manually call the add_trigger method on the ee_filebrowser JQuery object which exists in page. So basically, I just added the following to my Widget template. When the Widget is loaded this JQuery is immediately executed. <script type="text/javascript"> $.ee_filebrowser....


2

Set your var like this, using the trim parameter to remove whitespace and line breaks from the captured variable: {exp:channel:entries channel="rehab" url_title="{segment_3}" limit="1" require_entry="yes"} {exp:stash:set name="update_ids" parse_tags="yes" trim="yes"} 0{exp:playa:parents channel="rehab_updates" status="open" limit="10"}|{entry_id}...


2

Ultimately I've decided on the really rather simple solution as follows. An EE template at 'site/ajax_is_logged_in' with the following markup: {if logged_in}1{if:else}0{/if} Then in the registration form template I use the following jQuery: function is_logged_in() { $.get( "/site/ajax_is_logged_in", function(logged_in) { if (logged_in==1) { ...


2

...and also a checkbox that will show whether the user has completed that resource You can't store the member choices in the channel entries information. Well, technically you could, but it would have to store every members details so not optimal and not recommended. I'm assuming there could be a crossover - so 2 courses could share the same resource. So ...


2

I checked and I can see the XID param being sent to the jquery.ajax by looking in chrome network panel, i can see the query string it builds. So we are good there. It sounds like you are sending the XID in GET instead of POST data. CSRF tokens must be present in the POST data if POST data is received by ExpressionEngine. 2.7.3: POST: XID 2.8+: POST: ...


2

It's pretty munted. Presumably trying to make it IE6 compatible prevented them from just using :hover on divs and using an anchor as each .item HTML5 style. The javascipt is attempting to do some pretty run of mill stuff: a) it's adding a .hover class to the #products_box children on hover, which are the .row-span divs, not the .item elements. (easily ...


2

You aren't able to edit an iframe's content, true. But the iframe's itself still belongs to your page, and you can edit the attributes. I just tested and was able to do something similar to: var i = $('div.item iframe'); // Did the selector work? console.log(i.length); i.removeAttr('width'); i.removeAttr('height'); That being said, using !important in this ...


2

The url title is not specified in your script. I would recommend putting the url title in a data attribute in the html code. <a data-urltitle="{url_title}" class="fancybox project {categories}{category_name} {/categories}" href="{large_image}" title="{title}">...</a> then get that attribute in the js // Add buy now button var urltitle = this....


2

Are you including the jQuery datepicker file manually? Because channel form includes one as well. To disable channel form's datepicker file and initialization, include the include_assets="no" parameter.


2

Using your fiddle, use this as your JS : var newVal = []; $('select[name="the_product"]').change(function(e){ $('input#freeform_product').val(''); $('select[name="the_product"] option').each(function(){ if ($(this).is(':selected')) { newVal.push($(this).attr('value')); } }); $('...


2

This is because Calendar uses ExpressionEngine's built in jQuery UI bundle to build the mini calendar popup. You will probably have to use some combination of the two with jQuery's noConflict method: http://api.jquery.com/jQuery.noConflict/


Only top voted, non community-wiki answers of a minimum length are eligible