I am trying to animate the drawing of a simple line from one point within an html element to another. The animation should be slightly slow (maybe taking like one second to reach the second point, but also customizable). I have been searching for the last couple of hours and have yet to find a single javascript library that does this for...
I want to use the value of a variable as an "index" of an object, an of a value inside of it.
Unfortunately this code won't run.
animatedObjects = {
userPosition.uid: {
"uid": userPosition.uid,
"x": 30,
"y": 31
}
}
Wher...
I am working on a web application that gets JSON data from the server (Ruby/Rails) into the client using jQuery/ajax and then renders it to the browser using jQuery to populate the DOM. To simplify access to my data on the client side, I would like to use an object-relational mapper similar to ActiveRecord, but which starts with JSON dat...
I have a list of checkboxes.
If the page is refreshed before the user submits the form, I want the state of the checkboxes (checked or not checked) to be preserved.
Ie: user selects option 1, option 4 and option 5. The page refreshes and option 1, option 4 and option 5 remain checked.
I have looked into serialising then storing a cook...
The global picture is that I want my Firefox X11 window to have its urgent flag set when (say) a new Gmail mail arrives.
I feel confident that I can produce the code to check Gmails arrival by reading some other Firefox extensions' code. What I can't figure out is how to get the Window ID of the webbrowser, so that I can call, say, a...
Hi,
I'm using scriptaculous to enable Drag&Drop (using Sortables) for components within a CMS. To ensure that even long component list (with scrolling) can be used without side-effects I had to set Position.includeScrollOffsets = true;.
The problem is that other parts of the CMS (which I can't modify easily) break due to this setting. ...
I am working on a large site that has a lot of custom (page specific js). There is one main.js and page-specific.js files. Is there a better approach that can use the following pattern?
How can I re-factor multiple methods that use ajax?
I currently assign all onclick events inline such as onclick="MYSITE.message.send... - it there a be...
I am doing an ajax call using jquery to get data in json format. the success callback function is called but the data is empty.
$(document).ready(function () {
$.ajax({
url: "http://apps.sungardhe.com/StudentResearch/public/Research.svc/Schools",
type: "GET",
contentType: "application/json; charset=utf-8",
...
I am trying to implement a simple floating navigation using the DOM and Javascript. The following script is triggered using the onscroll event, but nothing happens and debugging through firebug has not been all that enlightening.
function float_nav() {
nav = document.getElementById("nav_container");
offset = window.pageYOffset + 'px...
I am building a site and I have a page which takes an address and uses it to generate a 2D roadmap style google-map and then next to it, the street view for that address.
My problem is that these two maps span almost the entire width of the site and the user is likely to have their mouse go over it when scrolling down the page and get ...
I'm developing a fairly large page with several external javascript files. In IE6, the page hangs for a few seconds just as it's finished loading. I'm not (directly) asking for help debugging this problem, I'm only asking for help finding a tool to help debug this problem.
What I'm looking for is something similar to Chrome Developer To...
I am trying to use a tooltip jQuery plugin. This is what I have in <head> of index.html:
<head>
<title>Index</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/simpletip-1.3.1.min.js" type="text/javascript"></script>
...
I have an input box: input type="text" class="rulerInputText" id="rulerInputBox" readonly
I have Javascript code to detect the selected text and play around with it.
The issue comes when I am allowing the user to actually select text. The text is basic with spaces. When the user begins selecting, there is no issue, but when a space is ...
If I run it. It returns no errors. And in firebug it does in fact select the proper elements in the DOM.
If I break it apart and do something like this :
$('img[hspace]').css('marginLeft', ($('img[hspace]').attr('hspace') / 2) + 'px')
That works.
Here's the monster in its entirety.
$('img[hspace]').each(function(el){
var pixel...
Hi,
I'm using jquery's .each() to iterate over a group of li's. I need a total of all the li's matched. Is the only way to create a count variable outside the .each() and increment this inside the .each()? It doesn't seem very elegant.
var count;
$('#accordion li').each(function() {
++count;
});
...
Hi,
I looking for practical(with computer) web client side exams (javascript, css) because I have 3 hours exam with javascript + css without internet only notepad+browser.
I dont know if i will able to use JQUERY, I should prepare for use only regular javascript.
(If you know good books or tutorial its may helps too).
Edit:
my ideas f...
I have the code below. IE8 displays a smaller height. The difference is over 100 pixels. It works fine in FireFox. Why doesn't it work right in IE?
<html>
<body>
<script type="text/javascript" src='<%=ResolveUrl("~/includes/jquery-1.4.2.min.js") %>'></script>
<script type="text/javascript">
window.onresize = ff;
fu...
Is there a way in JavaScript to propagate events to elements obscured by another one? Because I have an element with position: absolute that obscures elements that aren't parent elements of it, but I'd like click, mousemove and mousout events to pass through this element. The solution can be Mozilla Firefox specific, because I'll use it ...
I've seen this question asked several times but haven't seen any answers.
I have a ul that I'm expanding and collapsing using slideToggle() with jquery.
The code is simple:
$('#leftMenu li a.moreLess').click(function() {
$(this).next().slideToggle('normal');
});
With markup of:
<a class="moreLess">Click here to see more</a>
<...
Now that I discovered here that I can't write JavaScript within one page to enter form data on another external page, I'd like to do this with a browser-based bookmarklet instead.
I'm able to access the data on my original page with this bookmarklet code snippet:
javascript:var%20thecode=document.myForm.myTextArea.value;
If I open t...