firebug

Calling custom functions from firebug console

风格不统一 提交于 2019-11-30 14:19:20
问题 I created a document that loads a .js document that has some JQuery functions that I have created. I would like to use the firebug console to quickly test the functionality of these functions on my html document. But when I try and call these function in the console I don't get any response. for example: I have index.html that call my JS: <script src="jquery.js" type"text/javascript"></script> <script src="myfunctions.js" type="text/javascript"></script> Myfuntions.js has the following

Script tags added via jQuery not visible in FireBug

依然范特西╮ 提交于 2019-11-30 13:43:15
I am adding <script type="text/javascript" src="http://somedomain/somescript.js"> to the document head via jQuery. This is the code I use: $(document).ready(function () { var s = document.createElement("script"); s.type = "text/javascript"; s.src = (document.location.protocol == "https:" ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js"; $("head").append(s); }); While the script seems to be working perfectly, I do not see the scripts in the head when I use FireBug to inspect document head. This snippet does not show the added script(s) either: $('script[src]').each(function(){

Logging to console from Firefox extension?

我们两清 提交于 2019-11-30 12:54:46
I understand that I can log to the console when using a Firefox extension with the cfx run command. Is there a way to log to a console after the extension has been packaged with cfx xpi ? Logging to Firebug is fine if possible. I have found two blog posts about this ( here and here ). Both are rather old and don't work any more. I'm using version 1.10 of the add-on SDK and FF15. You need to do 2 things: enable logging for addons • in about:config, add a new option "extensions.sdk.console.logLevel" and give it the value "all" • restart Firefox in Firefox open the Browser Console : • Tools ->

.attr(“disabled”, “disabled”) issue

Deadly 提交于 2019-11-30 12:35:40
问题 I have this function toggles the disabled attribute form a input field: $('.someElement').click(function(){ if (someCondition) { console.log($target.prev('input')) // gives out the right object $target.toggleClass('open').prev('input').attr('disabled', 'disabled'); }else{ $target.toggleClass('open').prev('input').removeAttr('disabled'); //this works } }) the removeAttr works fine but when i need to add the disabled again it does just nothing. My console.log is triggered (and giving me back

How do I cd into an iframe in chrome developer tools or firebug lite in chrome?

拟墨画扇 提交于 2019-11-30 11:44:59
when I try cd, console says "cd is not defined" Yes, you are right Firebug have this awesome command. I really like it. It's making wotking with iframes much easier. Personally I don't go to Firefox just because the cd() is available in it because I can do whatever I can do with cd in chrome dev tools too. Just use contentWindow keyword in your command prompt to access the iframe window Object. Then you will be good to access any function and variable out there. For example I have a variable in my iframe that is not accessible via console normally. But still I can access to the variable via

How do I find what Javascript is running on certain events?

安稳与你 提交于 2019-11-30 11:01:01
问题 I'll pick Chrome for this example, but I'm open to a solution from any browser. Use Case: I have an update button on my website that is used to update item quantities in a shopping cart. I'd like to allow a user to enter a 0 and click update in order to remove the item. Trouble is, there is some listener in some js function that is denying the ability to enter a 0 and click update (after clicking update the old quantity remains). My question is, what developer tool can I use to find which js

Break when window.location changes? [duplicate]

可紊 提交于 2019-11-30 10:54:20
问题 This question already has answers here : Break javascript before an inline javascript redirect in Chrome (3 answers) Closed 2 years ago . I've got a page that's redirecting when it shouldn't be, and I'm trying to figure out who's doing it. First I tried hijacking window.location: window.location = (function (location) { // location is now hidden inside a closure. We can override it var Location = Object.create(location); // Location is now our proxy. We can use it to catch changes window._

How to debug JavaScript code with mobile browsers

微笑、不失礼 提交于 2019-11-30 10:53:41
问题 I know about firebug and the developer tools for the major modern desktop browsers, but I can't find any way of debugging JavaScript code on mobile browsers. What are some high level techniques I can use to debug code on mobile browsers? 回答1: Android provides a tool set for these purposes: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3 Apple does it a similar way: https://developer.apple.com/safari/tools/

How to increase number of Call Stack entries in Google Chrome Developer Tools (or Firefox)?

那年仲夏 提交于 2019-11-30 10:25:45
问题 How to increase number of Call Stack entries in Google Chrome Developer Tools (or Firefox Firebug)? I am getting a Javascript error in a third party control's Javascript. All the calls in the Call Stack window do not belong to my own code. I want to know which line in my code triggered the sequence of events. The Call Stack is not large enough to display something from my own code. 回答1: Chrome solution https://github.com/v8/v8/wiki/Stack%20Trace%20API can set via commandline on startup --js

Calling custom functions from firebug console

早过忘川 提交于 2019-11-30 10:07:24
I created a document that loads a .js document that has some JQuery functions that I have created. I would like to use the firebug console to quickly test the functionality of these functions on my html document. But when I try and call these function in the console I don't get any response. for example: I have index.html that call my JS: <script src="jquery.js" type"text/javascript"></script> <script src="myfunctions.js" type="text/javascript"></script> Myfuntions.js has the following defined in it: function showAbout(){ $('div#about').show("slow"); $('.navbar #about-button').attr('disabled',