I have done locally a rating bar with the help of jQuery and I only use .css method and events like click, mouseup, mousedown and mousemove in javascript.
This works like it should locally (offline) but when I am uploading it up on a server it seems to do nothing...
I have tried to see with firebug what is wrong and it seems that online firebug doesn't see the javascript file with the slider but locally it does. Although when I try to view the javascript from the html pagesource(in firefox) it seems to be ok and the javascript fle its there..
Why the slider it doesn't work and why does firebug not seeing the script?
Thank you!
I have solved the problem, I had wrapped the listeners in
$(document).ready(function() {
//my code here
});
And now it works just fine.. I don't know why it worked locally but on the host not but now it works :D
Thanks for help anyway!
Related
I am not a JS developer, I am just a Web Designer dealing with simple JS interaction most of the time.
I am using jquery-1.11.3 and jquery.mobile v1.4.5 with just core features and slider capability.
As tablet I have a kindle with the firefox (beta) browser and an ipod with safari browser.
I am having a problem in understanding some JS behaviours of tablets and browsers regarding the click event function and document ready
$(function(){
$('.menu-ham').click(function(){
alert("test")
});
});
the click event doesn't work on tablets but it works perfectly on web browsers.
Instead if use this outside the document ready
$(document).on('click', '.menu-ham', function(){
alert("test")
})
it works like a charm. Only that I am not sure if this it would create problem with the browser because not inside document.ready
I tried to use as well
$(function(){
$('.menu-ham').on('click', function(){
alert("test")
});
});
inside or outside the document ready and nothing works.
"menu-ham" it is a button with that class. I read about a lot of topics, who said to use cursor:pointer, who said to use ".on('click'" instead of the normal click event, or vclick, or bind or touchstart but none really worked a part the solution that I offered, and now I am very confused about the whole thing on why is working and the other are not when I read a lot of comments that the other solution should work.
Any help would be very much appreciated, thank you!
I found the problem! it was all fault of Phalcon debugbar. On the mobile devices was generating an error that it wasn't happening on the normal browser. This error was making any jquery or selectors working.
Thank you for your help and support!
I have little knowledge of javascript so I hope someone here could help me. The problem occurs on http://www.bestfreeandroidapps.com/ if you look on the right side there are 3 tabs with Categories, Comments and Recent Posts. When you click on them from Chrome, nothing happens (no errors in the console, just nothing), however it works fine in Firefox.
This theme uses a script calle Javascript tabifier from http://www.barelyfitz.com/projects/tabber/, however I even replaced the script on the theme with what was included in the original project and still doesn't work on Chrome. Does anyone have an idea of what might be wrong and why is this happening?
Thank you very much!
It works. I think its being cached by the browser, I've had similar problems lately. Restart browser/computer!
I have got three pages/divs sliding through (on one index page) using javascript/jquery, and a couple of pages/divs are set on timer. Please see my code and function on http://jsfiddle.net/EXfnN/35/
Everything is working perfectly in Firefox, but the slide and the timer are not working in IE.
How can I fix this javascript/IE problem please? Thanks in advance.
If the code you posted is the actual code you're using, comment out or remove the console.log statement. IE chokes on them if the debugger isn't open.
I've just realized that tinyMCE is not working when you use firefox 5.0
First I thought that's my fault with some script , but then I went straight to TinyMCE demo page http://www.tinymce.com/tryit/full.php and there was the same result.
In normal way you open page, see editor, see text inside editor.
With firefox you see editor, but nothing is inside textarea. It is empy, blank. And what's more strange there is no mouse cursor inside of it. You cannot set it there, thus you cannot write there.
Later on I made one notice.
I've started to refresh the page fast, many times so the browser cannot work fast.
And I saw that it writes textarea, then converts it into tinyMCE editor with all text inside of textarera, and then on the final step it hides or removes all the data from textarea, leaving empty editor with all buttons visible.
Any idea what's going on?
Of course I've posted this on TinyMCE forum, and bugreported it also, but things there run very slow, and on StackOverflow I've got used to fast answers :)
So if anyone has any idea about how can I fix it please tell me.
UPDATE
I think something is wrong with my computer.
I've just tested cuteEditors demo and it acts the same way
http://cutesoft.net/example/general.aspx
So I think problem is inside my computer.
Is it Firefox or what?
SOLVED
Plugins were the problem. I disabled all the plugins and everything works fine!
SOLVED Plugins were the problem. I disabled all the plugins and everything works fine!
I've got a text scrollbox made with JQuery. It works fine when on its own (nationalboston.com/temp) but when I hand it off to be wrapped into a Joomla page, the slider handle doesn't move (here). As far as I can tell, everything else works fine.
I've inspected the computed CSS in Chrome Inspector, and it seems that the handle is styled as it should be (position:absolute; top:auto;). What am I doing wrong?!
EDIT:This appears to be the case in Safari 3.x Mac and Chrome 3 Alpha Mac, Not in Firefox Mac. I haven't done further testing.
I followed your link in Firefox 3.0.11 on mac and the slider works perfectly. Did you find the solution to your problem? The first idea that came to me when I read your question was that you might have a javascript namespace conflict (using more than one JS framework?). A possible solution would then have been to run JQuery in no-conflict mode, as in:
jQuery.noConflict();
// Do something with jQuery
jQuery("div p").hide();
// Do something with another library's $()
$("content").style.display = 'none';
More info there: http://docs.jquery.com/Core/jQuery.noConflict