Is there a built in equivalent to the .NET framework's AddMonth function or VB's DateAdd function?
I'm looking for the easiest, cleanest way to add X month to a Javascript date.
I'd rather not handle the rolloing over of the year as done here.
or have to write my own function as done here.
Is there something built in that is as nice ...
My understanding is that mime types are set by the web server. Why do we add the type="text/javascript or type="text/css" attribute? Isn't this a useless and ignored attribute?
...
Hi, i have a basic jquery app that allows a user to edit and manipulate some lists on a page. What I would like to do is have a button 'restore original list' that the user can press to undo his modifications.
What is the best way to do this? I was thinking of just copying the DOM from the list down, and pasting it in a hidden element s...
In the code below, I'm using jquery 1.4.1 to modify the options in a select list when the user clicks on the list (replacing the single Old item with three New items). Selecting either New 2 or New 3 correctly fires the change() method (and show the alert), but selecting "New 1" does not. What am I missing? Thanks.
<html>
<head>
<scr...
I had the following check in my jQuery which I thought was working fine to see if a radio button was checked.
if ($("input[@name='companyType']:checked").attr('id') == "primary") {
...
}
Here's the radiobuttons:
<p>
<label>Company Type:</label>
<label for="primary"><input onclick="javascript: $('#sec').hide('sl...
I'm just starting out learning javascript, and tried to write a little script that would make a grid of divs on a page.
Here's the script:
var tileWidth=50;
var tileHeight=100;
var leftPos=10;
var topPos=10;
var columns=10;
var rows=10;
var spacing=5;
$('document').ready(function() {
placeTiles();
});
function makeRow() {
for (var ...
Which is the easiest to use/select date of birth?
...
Hi,
does anyone know how i can get the id of any element when the mouse is over ?
I want to show a div (box) over the elements (tags) the mouse is over.
I cannot modify the tags to include a mousover event. I want a global callback or something like that to have the id of the tag which is under the mouse pointer.
Thanks !
...
I am wondering for some time now, how did SO do this animation on answers when you click on link answer, answer divs color changes for some time and it reverts back, I'm sure this question has been asked before but I just couldn't find it. Or this random example :
http://stackoverflow.com/questions/2706443/what-pitfalls-if-any-are-there...
I have a user control that is emmitting javascript using the ClientId function. For example:
Out &= "ValidatorHookupControlID(" & Quote & ddlMonth.ClientID & Quote & "), document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf
It appears to me that the ClientID function DOES not return the ultimate ID that is sent t...
I'm writing a JavaScript chatting application, but I'm running into a minor problem.
Here is the HTML structure:
<div id="chat">
<div id="messages"></div>
<textarea></textarea>
</div>
When the user clicks/focuses on the chat box, I want the textbox to be automatically focused. I have this onfocus handler on the chat box:
cha...
I've been messing around with string.replace and I noticed something very odd with Webkit and Firebug's javascript consoles.
I can repeat this behavior in a blank browser window. (Look at the first and last lines)
>>> "/literature?page=".replace(/page=/i, "page=2")
"/literature?page="
>>> "/literature?page=".replace("page=", "page=2"...
Why is it that scripts can still function even after the code used to create them is removed from the DOM?
I ran into a situation where I wanted to prevent a broken script from running (@see my post).
In my attempt to come up with a solution I wrote an extension with the following line (just to see what would happen).
$('script', doc)...
I would like to autoload a local javascript file, everytime a new page/tab is opened in a browser. I tried the bookmarklet approach, but it gets tiresome as the button needs to be pressed everytime a new page/tab is opened. Chrome extensions also seem to work along the same lines (where you have to press an icon to run the js). Googling ...
How to simply show a set of hidden divs on mouseover.
so if
#div1
#div2
#div3
all need to be shown on mouseover, how to I do this?
...
I have a custom UIImageView class that creates thumbnails (UIImageView) and each thumbnail has a label.
The label is created by another class. The label class creates a UIImageView and a UITextView on top of it.
This is the main thumbnail class' init method:
- (id)initWithFrame:(CGRect)frame
{
if ([super initWithFrame:frame] == ni...
I am in need of some help with trying to figure out how to go about checking the users session and seeing if they are still logged in or not.
The problem being is because i have a static page that pretty much loads everything into "tabs" using jquery. So when the user navigates the page, it really never leaves that same page they starte...
I know JavaScript regular expressions can ignore case for the entire match, but what about just the first character? Then hello World! would match Hello World! but not hello world!.
...
Hi all
I'm using the navigator.geolocation.getCurrentPosition(function) api in firefox 3.6. When i try to call this method repeatedly I see that sometimes it works and sometimes it doesn't. I figured that the problem is because of its asynchronous callback nature. I can see that the callback function is being called at some point but my...
Does anyone know of a good jQuery content switcher? I want to switch a log in and register form.
...