I wanted to select any ul which contains more than 3 lis.
This code worked with the 1.2.6 jQuery library:
$("ul:has(li:gt(2))")
.each( function() {
$(this).css("border", "solid red 1px");
});
But not 1.3.2 or 1.4.2.
This code worked with the 1.4.2 jQuery library:
$('ul').has('li:nth-child(3)').css('border', 'solid red 1px...
I have a website where lots of people copy images off it, which is fine. What I do want to do, however, is help them embed it on the target website they are going to.
Ideally this would take the form where when a user right clicks the image a context menu will appear giving them easy options to embed or share the image.
What is the be...
Hello,
I have the div structure shown below. For the second <td> in the table i want to replace with a hyperlink whose href attribute is stored in the variable myLink.
How can i do this with jquery ?
Please help.
Thank You.
<div class="pbHeader">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
...
I like to think I'm not a dummy, but I can't get my jQuery horizontal slideshow to animate smoothly especially in FireFox (on a Mac). Anyone have advice?
Animation is being done like so:
$('#lookbook').stop().animate({left: -((lookbook-1)*825)+'px'}, { duration: 800, complete: cap_fade(1)});
Example link:
http://mayfourteenth.com/w/...
I need to select an HTML radiobutton (deselecting any previously selected radiobutton) on my form, from within Javascript.
How is this accomplished?
...
I'd like to generate a sequence of MIDI notes in javascript and then play it. Many plugins support MIDI, but I'm not aware of any supporting "data:" URL. Generating MIDI content is not a big deal - but feeding this content into player is. Anyone knows how this can be done - if not in general, then at least for specific plugin like QuickT...
Hello,
I have a legacy code to maintain and while trying to understand the logic behind the code, I have run into lots of annoying issues.
The application is written mainly in Java Script, with extensive usage of jQuery + different plugins, especially Accordion. It creates a wizard-like flow, where client code for the next step is down...
I want to add a set of lists to the children of another DOM element:
var req_subsets = $("#req_subsets");
$.each(subsets, function(index, subset) {
var subset_list = $("<ul></ul>");
// add DOM elements to subset_list
req_subsets.append(subset_list);
});
However, only one DOM element is ever adde...
The following code resets one selectOneMenu through particular id. How to make it dynamic for more selectOneMenus to reset at the top value.
var test= document.getElementById('form1:text3');
test.options.selectedIndex=0;
This resets to top value of menu, but how to make it dynamic.
ANy help is appreciated.
...
Can anyone help me with a Javascript question, please? Why does the following code display only message boxes with the word "null" in them? And I think there are not enough of them either.
<html>
<head>
<script type="text/javascript">
function showElementClasses(node) {
var els = node.getElementsByTagName("*");
...
this
Application.EventManager.on('Click', function(args) { // event listener, args is JSON
TestAction.getContents(args.node.id, function(result, e) {
console.log(result);
this.add({
title: args.node.id,
html: result
}).show();
});
});
I'm really struggling with scope and anonymou...
I want to create a table where each row has an expandable details row. See the below simplified example code. Upon clicking a row in the visible table, the corresponding row from the hidden table should be cloned and inserted below the clicked row -- thus creating an expanded row effect. A second click removes the details row.
The probl...
I was wondering if anyone has come up with an ASP.net server tag for the HTML5 canvas? I was thinking of something where I could declaritively define paths, curves; etc in the aspx markup, and the control would deliver the js to do this (perhaps with support for browser detection, and delivery of an emulation script for IE browsers.)
...
This is a bit of an open ended question but we have a problem with a web application that on the final step of completing an order, multiple post requests are being made, sometimes up to 10 and all within a couple of seconds to the page.
Theirs nothing unusual about the page, the user fills out a form which is then validated using the j...
Is it possible? I'm learning canvas at the moment, and while it's fun to position objects programmatically, it would be most interesting to come up with a way to align them to a curve.
E.g. align a series of squares back to back along a wavy line or a circle.
...
I have the jQuery UI framework's draggable and droppable elements working. I would like to programmatically determine which draggable elements are currently dropped on which droppable elements. Is there an easy way to do this?
I thought of using event listeners to detect drop and out events, then keep a dictionary or something in memory...
Hey all. Newbie JavaScript question here. I have an array: {r=1, g=4, b=6} How do i go about getting the value of each (r,g,b) into a separate variable?
...
Is there a way for javascript to detect all assigned variables? For example, if one js file creates a bunch of vars (globally scoped), can a subsequent file get all the vars without knowing what they're named and which might exist?
Thanks in advance :)
EDIT, Question Part 2:
How do I get the values of these variables? Here is what I h...
This is working fine in firefox but only closes the first page and then breaks in IE8. Firebug in IE8 says that x.item(o) is null. I can't figure out why this works in firefox but not IE. Thanks for any help.
pager(x=document.getElementsByName("pg1"));
function pager( x ) {
var curr = document.getElementById('showing');
$(curr...
Hi,
I used a javascript FocusChange() in my aspx page. I have couple of controls and I need Hit enter key need to move next control based on tab index. It is working good in IE7 but not working in IE8... Please help me on this..
Thanks for your help in advance. The java script is given below.
function FocusChange() {
if (window.ev...