Error when using foundation.core.js - javascript

I am trying to put some dropdown buttons on my site (doc : http://foundation.zurb.com/sites/docs/dropdown.html). I got it to work by just putting foundation.min.js on my page but that includes all of the plugins and is pretty large. I am trying to set it up by loading individual plugins according to the documentation : http://foundation.zurb.com/sites/docs/javascript.html.
I am loading foundation.core.js and after that I'm also loading the keyboard util, box util, and dropdown plugin.
This is the error that I get..
Uncaught TypeError: Cannot read property '_init' of undefined
This error is occuring on line 245 of foundation.core.js. It happens even when I just load jQuery and foundation.core.js with no other Foundation files.
Anyone have any ideas as to what is causing this and how to fix it?

Try inserting foundation.util.mediaQuery after foundation.core. The two scripts have a co-dependency.

Related

How to use Tablesorter with column selector widget - error?

I'm attempting to use Mottie's Tablesorter with the Column Selector widget using the example Bootstrap popover code provided in the documentation. However, I'm getting a Javascript exception thrown inside the columnSelector widget library. What am I doing wrong? Or is there perhaps an actual bug in one of the Tablesorter libraries in use?
Here is a link to a JS Fiddle which demonstrates the error:
https://jsfiddle.net/qmnev5wr/5/
You'll have to view the JS console in e.g. a browser's dev tools to see the error message live, but here's what I get:
jQuery.Deferred exception: o is undefined attachTo#https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.2/js/widgets/widget-columnSelector.min.js:3:8917
Here's an updated demo which fixed the following issues:
Added missing popper.js (Bootstrap requires it for popups)
Loaded bootstrap.js after popper.js
Added bootstrap.css
Added CSS copied from the tablesorter example page
Removed $("#claim-table").tablesorter(...) because it was initializing the table without the widgets - it's already being initialized inside the document ready function

SharePoint 2013, unable to set property 'control' .load()

I have customized a master page in SP 2013, adding a jquery library(vs:1.11.3) to the .html master page as well as some custom script for pulling in HTML content.
Custom Code reference in master page:
$(document).ready(function() {
$('#sideNavBox').empty().load('https://pageiampullingin.html');
$('#sideNavBox').css('display', 'block');
});
The page I'm pulling in has its own script links that act on the DOM elements for the page I'm pulling in. This code works, even though I'm getting an error:
"Unable to set property 'control' of undefined or null reference".
When I hit F12, occurs under ScriptResource.axd, {Sys.UI.Control ... a.control=this}. I've tried different methods for .load() but still getting this error. Again, HTML is pulled in and script works but can't figure out this error. When I block the .load function, the error goes away. Any help would be appreciated.
This line is causing that error: $('#sideNavBox').empty()
Not sure what you are trying to achieve. Remove the line and check. The error should be gone.
I know this is old but...
He's trying to replace the sharepoint left nav with custom content. I'd try this.
$('#sideNavBox').html("").load('https://pageiampullingin.html');

JS error causing WordPress plugin to not work

I'm trying to get a WordPress plugin "FlipBook" to display in a theme, however, in Console, the following URL will have the error listed below it: http://wiredhat.com/proofs/stc/wp/the-essential-guide/
"Uncaught TypeError: s.find(...).addSwipeEvents is not a function" referencing flipbook.min.js?ver=4.5.1:1
When using a default WP theme, the error goes away and it shows the proper output:
http://demo.modded.com/stc/wp/the-guide/
I'm not quite sure what's causing the conflict. It would be helpful if someone would indicate how they came to the correct fix for this so I could answer these things myself in the future.
You're loading two copies of jQuery in your page. First you load this:
<script type="text/javascript" src="http://wiredhat.com/proofs/stc/wp/wp-includes/js/jquery/jquery.js?ver=1.12.3"></script>
and later you load:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
$.fn.addSwipeEvents is defined after the first copy of jQuery is loaded, but it gets called after the second copy is loaded.
If you really need two versions of jQuery, you need to make use of jQuery.noConflict() to ensure that you call things with the save instance that they were loaded into. But if you don't, get rid of the second script tag.

Joomla! 2.5 and Virtuemart 2.0.18a $.facebox is undefined

I'm using Joomla! 2.5.8 and Virtuemart 2.0.18a and on Add to Cart I got "Typeerror $.facebox is undefined in vmprices.js (line 67)". When I changed my Joomla! Template to default I lost this error. Many researches gives that jQuery loads any time, but when I disabled VirtueMart jQuery, I've got an error that "jQuery is undefined".
My site is http://bestgifts.am
The reason is , you have multiple jquery includes by plugin or templates..
The quickest fix for facebox undefined error is include this code just before closing the body tag inside your template..
< script type="text/javascript" src="your_site_url/components/com_virtuemart/assets/js/facebox.js">
It works for me..
Dont forget to remove spaces from script tags..
It is work and for J1.5 + V2.0

Why isn't a jQuery Tools tooltip showing up as a jQuery extension?

I have a Boilerplate 2.0-based page and want to add tooltips. Under the call to load jQuery, I add a call to load the jQuery-tools bundle, and then in js/script.js call:
jQuery(".has-tooltip").tooltip();
The result? No tooltips show up; Chrome's JavaScript console gives:
jQuery('.has-tooltip').tooltip();
script.js:30Uncaught TypeError: Object [object Object] has no method 'tooltip'
So far as I can tell, and from the order of things in index.html, the following happens:
I load jQuery.
I load jQuery Tools, without apparent error.
I call jQuery().tooltip(). This errors out, and doesn't display tooltips.
What can I do to ensure that the Tools extension is being registered to jQuery and I can call jQuery().tooltip(...)?
ATdhvaanckse,
--edit--
It's for a portfolio; the URL is:
http://JonathanHayward.com/portfolio
I've tried to pull things in to local loading (i.e. removed the CDN jQuery hit); this has not produced observable differences.
First, You load jQuery twice, also have two body and html closing tags and fix Modernizr issue which is not defined

Categories