A project I'm currently working currently has about 10 ULs, each which will have anywhere from 10-50 elements in them. Its been proposed that each of those elements have a unique ID specified to it that we will use to update content with via Javascript.
This seems like a large number of IDs to add to a page, but each field will have ...
According to this page it would seem like they don't, in the sense that they don't actually run it, but that page is 2 years old (judging from the copyright info).
The reason I'm asking this question is because we use Javascript to replace text on our site with other more typographically sound content. We're worried that this may affect...
Why is it that when we link to a javascript file on x.com from y.com (for example google analytics or jquery) it doesn't cause any cross domain security issues?
For example:
in y.com/index.html we have:
<script type="text/javascript" src="http://x.com/jsfile.js" />
How can we know when this is ok to do and when it's not?
...
The infinity (∞) symbol gets converted to ∞ when it is inserted into my MySQL table by a PHP script, but if I insert it directly from phpMyAdmin, it inserts correctly. The symbol is passed to the PHP script by a GET call with the JavaScript function encodeURIComponent() around the contents. The field in the MySQL database is utf8_swe...
This is the part of page source of a website.
I need to grab the " crsEdId=78 " in the last line. Using JavaScript or JQuery.
I will use mozilla Jetpack to do the task.
How can i Get this Code first?
and What to do (RegEx or JQuery) on it !?
<div class="tools-menu-body" id="tools-menu-div" style="display: none;">
<div id="me...
Cletus helped my with this really sweet code yesterday:
http://stackoverflow.com/questions/2063122/what-javascript-object-am-i-looking-for-click-a-button-it-stays-bold-till-the-n
This takes the class of my li and changes the class. It works great! I'm wanting to extend this so it will also change the class within the a in the li. How ...
Hello everyone, I have some previous programming knowledge but need some help with this. I need to create a JavaScript bookmarklet like the one that Instapaper.com has.
I want for this bookmarklet to have the following functionality and look:
Popup on the corner of the page (which I could specify in the code)
Display a count-up timer ...
I'm using JQuery Calculation plugin with the following script:
function recalc() {
jQuery("input[class^=percent]").calc(
"(invoice - cost)/invoice * 100",
{
invoice: jQuery("input[class^=invoice]"),
cost: jQuery("input[class^=cost]")
},
function...
I am using the autocomplete functionality from JQuery and am having a small problem. I have a div element with some text and a variable number of input boxes that have autocomplete functionality. When a user clicks on the text in the div element, the input boxes are removed. Clicking on the text toggles between showing the input boxes...
i wanna send keystrokes typed in a text field but only in 1s interval.
this is to reduce the load of sending an ajax request on each keypress.
so eg. if the user types 4 letters within a sec the request will send all these 4 letters. and lets say he types nonstop in 1 min, then the script will send on 1s interval till he stops typing.
...
Hi,
I want to grab the image src on a product page in a e commerce website.
I'm writing this as a bookmarklet, so I'd like the code to work universally as possible.
I've noticed that there are only two reoccurring factors in the product image tag among top e-commerce websites (amazon, bestbuy ect.): border=0 and 180<width&height<400.
S...
Background:
In the current project I am working on, I have created a jquery plugin that creates a draggable 'google-maps'-esque map, made up of many tiles. Similar to how google map works, but without the zoom at this point.
This map plugin creates and destroys 10-20 <div> tiles per mouse being dragged one tile length using jQuery's $(...
can figure out whats wrong? always returns faluire
function addItem() {
var rowCount = $('#grid').getGridParam('records');
var lastRow = $('#grid').getRowData(rowCount - 1);
var newRow = lastRow;
newRow.Id = "0";
newRow.Person = "";
newRow.Date = "";
v...
i have a three arrays in javascript
var array1 = new Array (1,2,3,4,5);
var array2 = new Array ("a", "b", "c", "d", "e");
var array3 = new Array ("a", "c", "d");
and i basically want to:
Create a new array with array2 minus items in array3. So it should result in
var array4 = new Array {"b", "e"};
Create another array with the cor...
Hey, can you help me figure this out? I need to hide/show a div based on a dropdown box (the dropdown box only has a name, no id). If the value of the dropdown box is 2, it needs to be shown and for anything else it needs to be hidden. Here is what I have so far, but it doesn't seem to work (I tried using similar code on a checkbox and i...
or do you just have to do a loop and check each element ?
...
Hi! I wanted to know if there is some way to change something simple, such as a htaccess file, a js file, or a php file, and then all of the webpages on my site will show an under construction page. I do not really care all that much if the user has to be redirected, but I want the origonal url of the page to be displayed in the address ...
below Syntax var re = /(?!^[0-9]$)(?!^[.|+(){}]$)(?!^[a-zA-Z]$)^([a-zA-Z0-9]{6,15})$/;
But it doesn't validate the special symbols?
...
Hi all:
I'm doing a lot of work in Javascript with Visual Studio .Net 2008. It would be nice to have some sort of plugin to do auto completion for Javascript (a bit like ctrl space and a list of options come up in Java/C# etc).
Is there such plugin/tool out there?
Thanks.
...
Pouring over the release notes regarding jQuery 1.4, I came acrosss $.noop() which is:
Description: An empty function. (added in 1.4)
You can use this empty function when you wish to pass around a function that will do nothing.
Perhaps I'm missing something profound here, but what exactly is a practical use of passing around a...