I want to ask a question that has been asked before but does not have a concrete solution
I am using modal to open somewhere on my homepage in react native(
in HomePage in modal homestack)
When I go to CategoriesStack (I get this error here, but it doesn't matter where) when I change a page, I get the error in the image below, I can't understand where is the problem because it gives the error in modal.js how can i fix it?
Those methods were deprecated in 0.70
They can be replaced with the function .remove()
Here's some more info and a discussion
Related
actually I have a really weird problem, that I have been trying to solve for two weeks.
to begin with, I am using sharePoint 2010. we created two dashboards that fetch information from lists and then display them in a graphical form, simply the javaScript script using AJAX get the list and then use the information. its worth mentioning that I am using Jquery
here is a picture of what I am talking about:
lets say this is dashboard1
is working like a charm in all browser even internet explorer
the problem is with another dashboard, dashboard2,
the problem with dashboard2 is that, a jquery problem as I copied from the console:
Critical Error: Object doesn't support this property or method addeventlistener
to get what I mean, the navigation bars on the right get its html from the list that I fetch and I use jquery and bootstrab for collapse , this is how the not working page looks like:
the navigation bar doesn't get its items, the graphs don't load
I have tried this fix but it didn't work.
what I suspected is that, this problem is related to sharePoint somehow,let me tell you what else I have tried, I made another copy of the index.html which is the main index page for dashboard1 the working dashboard, and I called it test.html which has exactly the same code, its supposed to work right ? because this is just a copy of the index.html that is working in internet explorer and all browsers, but surprisingly it didn't work and I got the same error that I got when I run the other index2.html the one for the other dashboard (dashboard2).
what can cause this problem? and fixes can I try? Its nothing related to the code ( I can share the code if you want) but its a bug related to sharepoint or Microsoft explorer or both !
Critical Error: Object doesn't support this property or method addeventlistener
So first I have read this Stack Overflow question and it doesn't look like my same issue.
Basically I'm trying to use Mocha and Zombie.js to run some tests on my Node.js site.
I'm trying to check to see if I can create a user. In the end I would like to check to see if my bootstrap modal exists. Basically I have the bootstrap modal wrapped in an EJS if statement so there is defiantly a chance it might not exist. So that is why I'm trying to run tests on it.
But currently it's not even working with browser.assert.success(); so I'm currently just trying to solve this before moving on to checking for elements.
browser.visit('/login', function() {
browser.fill('email', 'test1#test.com');
browser.fill('password', 'testtest');
browser.pressButton('Login').then(function() {
browser.assert.success();
}).then(done, done);
});
In this case I should be running the following code on the page the browser is currently on.
<script>
$("#paymentModal").modal('show');
</script>
When running this unit test it gives me the following error.
https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:3
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpan
TypeError: j.getClientRects is not a function
at k (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:3:26891)
at Object.n.extend.pixelMarginRight (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:3:25936)
at a.getComputedStyle.Sa (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:3:27592)
at Function.n.extend.css (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:3:30895)
at https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:4:520
at Y (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:3:4661)
at n.fn.extend.css (https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js:4:361)
at c.setScrollbar (http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js:6:18612)
at c.show (http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js:6:14692)
at .<anonymous> (http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js:6:13878)
Looks to me like for some reason Zombie.js isn't loading jQuery on that page or there is an error. But in that previous Stack Overflow question and answer at the beginning of the question it looks like Zombie.js can load jQuery.
Are you not able to load jQuery with Zombie.js? How can I fix this? Seems like a very simple thing to test pages with jQuery. Any ideas?
Let me know if you need any additional information or anything. Thanks.
EDIT for some reason when downgrading to jQuery version 1.11.3 it seems to work and the error goes away. Any reason for this?
This bug is fixed : https://github.com/assaf/zombie/issues/1031
Adopting jsdom 8/9 as the fix for your problem was harder than I
wanted. It should be pretty easy to add a dummy implementation for
getClientRects() just to get past that specific failure. I'll try that
and see how it goes
Add a stub implementation of getClientRects() was straightforward. I've published 5.0.1 with a fix for this specific failure.
mdlavin
Okay, this one has me confused as hell (I've spent hours trying to figure it out) so I am hoping perhaps a fresh set of eyes might be able to spot the culprit easier than I can.
The page in question is here: http://centerpointesigns.com/dev/portfolio/
Go to that page on a desktop and open the GLA Building link (underlined).
You'll see that the gallery (using a plugin called Envira Gallery for WordPress) is super, super tiny and I know that this is because it can't determine the size of the modal it's within (which is a plugin called Easy Modal for WordPress).
I've added the following code to the functions.js file assuming it would fix it, but no suck luck:
// Prevent resizing of Envira Galleries with Easy Modal plugin
$('.emodal').on('emodalBeforeOpen', function() {
$(window).triggerHandler("resize");
});
Any thoughts on what I'm doing wrong here? Seems like it should be easy and I must be overlooking something obvious.
There's an error: "Uncaught TypeError: $ is not a function" in functions.js, line 56.
I replaced $ by jQuery, and your gallery now looks great :-)
jQuery('.emodal').on('emodalBeforeOpen', function() {
jQuery(window).triggerHandler("resize");
});
I have a wordpress website and I want to show my video using fancybox, so I tried wp plugin like "fancybox for wordpress" and "easy fancybox".
But both of them give me the error message "Uncaught TypeError: jQuery(...).fancybox is not a function".
I search for many questions on here and found this can be jquery conflict, but I cannot figure out where is it.
here is my site http://skyblueenglish.co.uk
Notice that I only have one of above plugins at one time.
as per my thinking and till i have checked, what happen is,
in word-press you have included fancybox jQuery and it will obviously installed when you have installed the plugin. Now what happen is ,while using some JS function or JS Class it is mandatory to include jQuery file before we use/include the third party JS.
I checked the "View Source" for your page.
<script src="http://skyblueenglish.co.uk/wp-content/themes/skybluetheme/js/jquery.min.js"></script>
and i found that above JavaScript file is included in the footer.
i just removed that line and put it before
<script type='text/javascript' src='http://skyblueenglish.co.uk/wp-content/plugins/fancybox-for-wordpress/fancybox/jquery.fancybox.js?ver=1.3.4'></script>
and the error is Gone.
so what you have to do is, you have to find your footer, find the included jquery.min.js . remove it from the footer and include it from header.
Let me know if you dont understand anywhere.
;( function( $ ) {
$(document).ready(function(){
$(".fancybox").fancybox({
//....
});
});
} )( jQuery );
I did so many experiments on same topic and also tried with many different way to solve according to wherever I found similar topics on internet but trust me nothing worked out for me and then finally I simply tried to see what exactly error says:
Uncaught TypeError: $(...).fancybox is not a function
and for which I simply removed a line which was saying if($.fn.fancybox!==null).
I am not strong enough to understand Javascript or Jquery thing being fresher so I just tried with simple logic and it worked for me lol.
This might not be the right solution but just thought to share my experience so maybe for someone it may work too.
It worked properly without loosing any function by removing below code
if($.fn.fancybox!==null)
{$("a[class^='fancyBox']").fancybox();
$("a[class^='fancybox-thumb']").fancybox(
{helpers:{title:{type:'outside'},thumbs:{width:50,height:50}}});}
Thank You!
I am experiencing a very strange issue i am hoping someone can answer (its kind of broad, but i will explain it my best), code works on local page when opened, but as soon as the same page is uploaded it throws an error. Two others have also looked at this, resulting in more confusion.
I downloaded FancyBox to use the inline feature to pop up a user form via href link, instead of taking the user to an additional page.
You can see the "stock" fancy box here:
1 fancyapps.com/fancybox/demo
Under various options, Inline is what i am using.
I didnt need all of the other features that came with FancyBox so i stripped the page to the following, which works just fine:
2 *Fancy Box Demo Stripped to Inline Feature only*
So then, i applied this code to our sandbox copy of the page to implement:
3 *Sandbox Copy with Fancy Box inline feature added to "make offer" link*
It stops working! There are no conflicts with other javascript on the page, and the only difference is that it has a couple of color .css changes, all .fancybox was named to .ptroffer and that the css code is not inline on the page (which wouldn't cause this error anyway).
This same page, opened locally works beautifully - upload and it throws error.
SCRIPT5007: Unable to get value of the property 'ptroffer': object is null or undefined
<script type="text/javascript">
$(document).ready(function() {
$('.ptroffer').ptroffer();
});
</script>
Works fine with link #2, and with link #3 locally, but with #3 uploaded it throws error.
Please!
Something in your code somewhere is overriding $. If you change that "ready" handler to call
jQuery('.ptroffer').ptroffer();
you won't get that error. However, things may not work; I think that an older version of jQuery is being imported by something (1.3!), which is bad.
edit oh I see, something's pulling in Prototype. You've got a regular script soup going on there, and things are going to be unpredictable and bizarre until you get that straightened out. Probably somewhere in there something's calling jQuery.noConflict(), but that "ready" handler you're adding isn't written to expect that. Whatever code that's expecting jQuery 1.3 may be in for a surprise also.