Im sure the solution is simple but I cant figure it out :(
I need to combine two jquery selectors in one selector:
$(this) + $('input[type=text]:first')
$(this) is e.g div#selected so the result should ... |
I've sussed how to use YQL and jquery to pull in and inject HTML into a div element.
However, I want to filter out a div with the class in the HTML ... |
I have the following jquery which animates on hover:
$('#footerNetwork').hover(function(){
$('#popupNetwork').animate({top:'-62px'},{queue:true,duration:500});
...
|
Just another silly thought for jquery. Is it possible to do something like this in Jquery:
Instead of typing all three like this:
$('#id1').click(function(){
$('#idanother1').animate({height:'100px'},450);
$('#id1').toggleClass('my-added-class');
});
$('#id2').click(function(){
$('#idanother2').animate({height:'100px'},450);
$('#id2').toggleClass('my-added-class');
});
$('#id3').click(function(){
$('#idanother3').animate({height:'100px'},450);
$('#id3').toggleClass('my-added-class');
});
I would like to be able to write it something ... |
I'm trying to combine 'this' with div:first-child to get the html value of a hidden div that makes up the body of an anchor tag. How should this work?
$('a').click( function(){
...
|
how can i merge the results of two select statments with jquery?
for example i have
var previous = $(this).prev('td');
var next = $(this).next('td');
how do i then combine the two sets of results ... |
I'm having a brain dead kind of day and I'm trying to figure out a way to make this smaller and everything I've tried has not worked. I know ... |
|
in my example http://jsfiddle.net/radek/HnXC4/2/ I defined jQuery handler for click
- on button
- that have a class run
via $(":button, .run").click(function(){
how come the this button should NOT work button's clicked ... |
I want to do the following:
$("#dat_chk" + (i)).css("background-color", "#f6FFee");
$("#dat_opt" + (i)).css("background-color", "#f6FFee");
$("#dat_txt" + (i)).css("background-color", "#f6FFee");
Is these way I can shorten to just one select with jQuery?
|
I have a Javascript that I am working on and I would like to combine two selectors so that they refer to this tag only:
<input name="checkable" type="checkbox">
So that only checkable with ... |
I have this piece of javascript that is working.
var footerColour = $.color.extract($("div#one.footer"), 'background-color');
var newrgba = $.color.parse(footerColour).add('a', -0.5).toString()
$("div#one.footer").css("background-color", ''+ newrgba +'');
var navColour = $.color.extract($("div#two.nav"), 'background-color');
var newrgba1 = $.color.parse(navColour).add('a', -0.5).toString()
$("div#two.nav").css("background-color", ''+ newrgba1 +'');
It ... |
I have a table with checkboxes in each row. Now, only if a row is selected, I need to validate certain fields in that row as I might have hundreds of rows and it would take an aweful amount of time if I had to iterate through all of them and then validate if checked. |
|
|
hi all. i'm new here and i hope posting in right place. I'd like toask if and how I can add multicombined selectors like:$(this).parent().parent().$("input:checkbox[class='list']").attr('checked')I know that the $("input:checkbox[ppb='list']") isn't right but i justwant to show you what i want to do.I'm already inside a selector:$("input:button[name='delete']").click(function() { if ($(this).parent().parent().$("input:checkbox[class='list']").attr('checked')) { //dosomething}});is this posible?thanks in advanceN. |
To help troubleshoot, take jQuery out of the picture and replace your alertwith:alert( this + " input[type='submit']" );That will make it clear what the problem is.Since concatenating "this" to a string doesn't work, how do you fix it? Usethe second argument to the $ function:$( selector, context )Like this:alert( $( " input[type='submit']", this ).attr('id') );-Mike |
|
Is there a way to combine selectors? My code is getting pretty messy when it's all really just the same thing. //These all do the same thing, only the selector changes //Is there a way to make it cleaner by combining them all? $('#mploader_women1 a').fancybox({'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true}); ... |
I need help in this compound selector problem. I have the followingjQuery statements, which are working: $("input[@type='button']").addClass("button"); $("input[@type='submit']").addClass("button"); $("input[@type='reset']").addClass("button");I want to combine them into a single statement, such as: $("input[@type='button' or @type='submit' or@type='reset']").addClass("button");or $("input[@type='button'] or input[@type='submit'] orinput[@type='reset']").addClass("button");similar to the Boolean OR that XPATH expresssion allows, but it doesnot work. What is the proper syntax, if the combining is possible? |
|