I am trying to lay one div over another. IE reports "Invalid Argument". Can anyone tell me what I am doing wrong please?
var left = $("#container").offset().left;
var top = $("#container").offset().top;
$("#overlay").css({"left":left + "px", "top":top + "px"});
...
I created a div like so:
$(document).ready(function() {
$(document.createElement("div")).attr("id", "container").appendTo("body");
});
and then later, dynamically I want to append some stuff to it, so in another function I call
$(newElement).appendTo("#container");
but it doesn't do anything. The div is still there, bu...
I'm attempting to return a list of observers associated with a particular object using prototype.js 1.6.1. I've googled my eyes out all day and am getting frustrated. I've discovered two methods that used to work with older versions, but do not work with the latest version of the library. These include:
Event.oberservers (Worked wit...
Do we need to check our sites on Firefox 3.5 and 3.6 both for
XHTML CSS layout
and sIFR and j
query/javascript code compatibility?
If my xhtml and css is valid.
If i upgrade my 3.5 to 3.6 then will i have to check site with 3.5 also. or both will render in same way. if 3.6 render differently then i would not upgrade because 3.6 has...
If I have a textarea on an HTML page with multiple lines of text in it, how can I most easily append more text to one of those lines (chosen based on user input) using only Javascript?
...
What is the easiest way to insert a new object into an array of objects at the index position 0? No jQuery; MooTools okay; no unshift() because it's undefined in IE according to w3schools.
...
I saw a question here and many blog posts about getting jquery into greasemonkey, but I can't get anything to work.
Here's my script:
// ==UserScript==
// @name Hello jQuery
// @namespace http://foo.bar
// @description jQuery test script
// @include *
// ==/UserScript==
#{contents of jquery.latest.js pasted in}
...
Hi!, please help me, I know in general how to use the draggable and droppable classes, but I can not find a way to achieve this:
I have a large-sized image that I need to drag and drop into a div.
1) while dragging, instead of moving around the large-sized image, I want to use a small-sized image (I already have it, just need to chang...
I am using Rails and jQuery, making an ajax call initiated by clicking a link. I setup my application.js file to look like the one proposed here and it works great. The problem I'm having is how can I use $(this) in my say.. update.js.erb file to represent the link I clicked? I don't want to have to assign an ID to every one, then recomp...
I want to get the data from http://whatismyip.com/automation/n09230945.asp using JavaScript. How can I do this?
I can get the data from ASP.NET by using WebClient class but how can we get data using JavaScript?
...
I'm trying to make an API call to Facebook to retrieve my status and display it on my website.
...
hy i have a index.php with a form, after i submit the form with a iframe to a page.php, a loading process appears
in page.php when execute the first function i want javascript to execute a function in index.php, the page who is visualized!
when execute the second function i want javascript to execute another function in index.php
how ...
I'm controlling a embedded youtube chromeless player with javascript, and I want to hide it occasionally by setting display: none. However, when I show the player again, it loses its youtube methods.
For example:
<script>
swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=player",
"player", "425", ...
Hi,
I'm using WIRIS Formula Editor as a plugin in fckEditor. The formula adds image in which the attribute alt and uses » to > and « to <.
A sample alt attribute is as below:
alt="«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mfenced close=¨}¨ open=¨¨»«mtable»«mtr»«mtd»«mi»a«/mi»«/mtd»«/mtr»«mtr»«mtd»«mi»b«/mi»«/mtd»«/mtr»«mtr»«m...
I have a table in which i add rows dynamically and i want to add a vertically scroll to the table when its width get 300 or more. Any tips?
...
Any idea why this would have an effect? Sorry I can't give the other code as it is private and non shareable :(
Any tips would be appreciated.
<body onresize="resizeWindow()" onload="resizeWindow()">
Content deedeedum.AJAX function to get data and display every 2sec.
</body>
<script type="javascript/text>
/**** Page Res...
Hi,
i am running on php, mysql and using mootools1.2 as my js framework.
I want that all broken images should replace with a single error image.
How should i do this.
Thanks
Avinash
...
Hello,
is it possible to call c# functions with javascript parameters (from javascript)?
i.e.
<script>
function someFunction()
{
var data = "123";
var test ="<% AppHelper.GetSomething("+data+"); %>";
}
</script>
Thank You !
...
I am trying to fake a file upload without actually using a file input from the user. The file's content will be dynamically generated from a string.
Is this possible? Have anyone ever done this before? Are there examples/theory available?
To clarify, I know how to upload a file using AJAX techniques using a hidden iframe and friends - ...
Order Page: On this page, customers can choose to add business card orders with different foreign languages and other options.
When the user clicks on a button to add an additional card, javaScript adds a series of form fields and in order to give them unique name attributes, I am simply adding a counter variable at the end of the name ...