Hello
I was checking out HTML5 new javascript commands and there is something similar to:
var els = document.querySelectorAll("ul li:nth-child(odd)");
This allows you to find all elements by css syntax.
But I sure Jquery also has something a little similar to this.
The question is, as browsers are getting better javascript APIs...
...
What I'm trying to do is make a loop which prompts the user for information and will only stop if certain strings are entered. Specifically, I want it only to accept certain letters, both upper and lowercase. Here's what I have so far:
do
{
salesP = prompt("Enter the initial of the first name of the salesperson: ", "");
}while (sal...
Webkit allows the use of an external SVG file as a mask for any HTML element. Ie:
<img src="kate.png" style="-webkit-mask-image: url(circle.svg)">
Resulting in:
(More information here: http://webkit.org/blog/181/css-masks/)
Does anyone know if there's a way to do it without an external SVG file? More specifically, can it be done w...
I am trying to recreate the "Styles" section of the Office ribbon:
http://www.winsupersite.com/images/reviews/office2007_b2_06.jpg
I like how it starts out as only one row, then you can scroll through the rows, then click the arrow to expand all into a table like above. Does anyone have any ideas on how to recreate this whole interactiv...
Need to search a string and replace value="ANYTHING" with value="", basically blank out the value. Thanks.
...
Possible Duplicates:
Javascript closure inside loops - simple practical example
Javascript closure stores value at the wrong time
for (var i = 1; i <= 3; ++i) {
setTimeout(function() {
alert(i);
}, i * 1000);
}
This alerts "4" 3 times. I know why, but I won't spoil it here... although I forgot how to fix it...
I'm currently trying to use jQuery to fade a particular div which contains a few other child divs. I tought it would work but I think there is more to that... Can anyone help me out what's the best way to fade all the elements of the parent div?
Currently using the following, but only the background of the parent div is fading and the...
I work for a company that built interactive seating charts using Javascript. Here's an example: http://seatgeek.com/event/show/457624/miami-dolphins-at-new-york-jets-2010-12-12/. In many ways they mimic the functionality of Google Maps.
We're dealing with an odd problem--performance for the maps is fine in all browsers except IE8. I'...
Dear all, consider this:
core.js:
var core =
{
all:{},
load: function(jsUrl)
{
$.ajaxStup({async, false});
$.getScript(jsUrl);
},
init: function ()
{
$.getJSON('someurl', function(data)
{
for(key in this.all)
...
On a website that I'm currently making I placed a selectbox were user's can sort a list of items displayed on the page. When they choose one, the page is being submitted and the selectbox value jumps back to the first default one. Now I want the selectbox to retain value after submitted.
Im working in XSLT, so I can't use PHP. Is there...
Hi I have a fairly basic task, but cant seem to find the right answer to,
I'm making a set of buttons, you put the mouse over them and they change to a different image, take mouse off, change back...
It works fine in Safari, IE, Chrome,
Get into firefox and 4 don't work, randomly, not in any sort of order...
main.php -
news.php -
e...
Hi,
i have some problems with my site. it eats ram like a monster.
javascript causes that but i don't know what to do.
i use jquery framework and jwplayer(+some listeners)
how can I detect which code causes that?
...
I am getting (NS_ERROR_DOCUMENT_NOT_CACHED) error when I try to access the Javascript code through firefox.I get this error in the contents tab of HTTPFOX.
The code is as follow:
<html><head></head>
<body>
<button type="button" onClick="handleButtonClick();">undo</button>
<button type="button">redo</button>
<select><option value="V1"...
I'm creating a web-database driven offline web-app targeted at iOS devices. I'm trying to use jQuery Mobile, but I have a problem in creating the various forms.
The form options are taken from a database query, so they are inserted into the page after it has loaded, so the "jQuery-Mobilification" doesn't happen. Taking a quick look th...
I am using jquery validate with a form. I want to submit the form using ajax. When I put the ajax call in validate's submitHandler() The browser hangs. What's going on?
The error message I get when I enable the validate method's debug is:
uncaught exception: [Exception...
"Illegal operation on WrappedNative
prototype object" nsr...
What is best practice with regard to using links/<a> tags with explicit hrefs to other pages in your site (i.e. href="/blah/blah/blah.html) vs having hrefs/divs/etc. that don't have an explicit href and have their onclick set within the document ready handler with JavaScript in say a main.js file.
I'm not an expert when it comes to web ...
This worked great when there was only one entry in the database, but add another and now I've got problems. Since I'm appending based on class names I'm getting every element appending to a single class. I don't know what to do in order to create two "blogHeadlines" with the appropriate content in each.
jquery:
$(blogEntries).e...
Hello, I'm looking to do the following
timestamp1 = Time.now?
timestamp2 = lastSave --- My func would be setting this
if (compare (timestamp1 to timestamp2) > 5 seconds
Any ideas on how to do this with JS? Thanks
...
Hello,
Does anyone know how to convert "Date().getTime()" to UTC?
Obviously the getTime() is the users local time so I need a function to get the users timezone, convert the timestamp to UTC so I can then * it by -8 to get the current PST time.
...
Why in the following code the focusin event handler isn't called ?
HTML:
<div id='wrapper'></div>
<div id='button'>Click Here</div>
<div id='output'></div>
JS:
$(function() {
$('input').live('focusin', function() {
$('#output').html('focusin'); // Why this not happens ?
});
$('#button').click(function() {
...