I have page part like this
<div id="inbox">
<h1>Headline</h1>
<p>First paragraph</p>
<table>
<tbody>
<tr>
<td>table stuff</td>
</tr>
</tbody>
</table>
<p>Second paragraph</p>
</div>
I want to assign a handler to everything within the #inbox div that is not a part (a child) of the table. I tr...
I have used a scrollTop function in jquery for navigating to top. But strangely 'The smooth animated scroll' stopped working in safari and chrome(scrolling without smooth animation) after I made some changes. But it is working smoothly in Firefox. What could be wrong?
Here is the jquery function i used,
jQuery
$('a#gotop').click(functi...
I have multiple comment ids I want to reset to a default value.
Ex:
<a id="comments_inner_toggle_45">example 1</a>
<a id="comments_inner_toggle_608">example 2</a>
<a id="comments_inner_toggle_28">example 3</a>
...
How can I write the correct tag in jQuery to select every tag with an id of "comments_inner_toggle_" and perform some ope...
In the following code once the mouse out is done the mouse over again does not work ,what is the work around for this
<!DOCTYPE html>
<html>
<head>
<style>
/* div { background:#def3ca; margin:3px; width:80px;
display:none; float:left; text-align:center; }*/
</style>
<script src="http://code.jquery.com/jquery-latest.min.j...
Hello,
I am trying get the html within .event_recur.
$(".entry").each(function(){
alert($(this).find(".event_recur").html());
});
<div class="entry">
<p class="event_title">June 21st Event - eat</p>
<p class="event_start_date">1277160289</p>
<p class="event_end_date">1277505889</p>
<p class="event_body"><p>June 21-25th
</p></p>
<p ...
Hi there,
I have an emote selector that opens up when a user clicks an entry in a diary. The way I've worked it is that the emote selector panel lives hidden at the top of the page. When a user clicks on the 'emote control' associated with an entry, I use JavaScript to grab the HTML of the emote selector panel from the top of the page...
I need to run a function 'setNotifications()' after a timed delay or at the end of completion of the previous animation('#topannounce' animation).But jQuery is not running the 'setNotifications()'after the animation. What should I do? or is there a better way to run the function?Plz hlp.Thanx.
Here is the jQuery I have.
$('a#resetbtn')...
Hi,
I was wondering whether there's a way of using multiple selectors in jQuery and setting different values for them IN ONE CALL.
E.g.:
$(selector1, selector2, selector3, ...).css({left:[532, 112, 453, ...]});
Thanks in advance
Edited: Just to be clear you can only call .css once. Is it possible?
Edited again to clarify: I'm aski...
I am trying to use the text attribute as a selector, but I can't quite grasp the behaviour, would really appreciate if someone could explain. For example given <span class="span_class"><a class="a_class">text</a></span>, $('a.a_class').text() gives "text" as expected. However $('a.a_class[text]') wouldn't match any elements, and neither ...
Users of my service includes a JS in their pages that I provide. I am hosting the script they are including. My script does some manipulation on their content. I am sick of writing my own DOM manipulators/selectors and wasting hours for jobs that can be done with 1 line of code if I can use jQuery.
Some of the users of my service alread...
I am trying to find the closest tr that also matches a specific class name. The selector returns no matches. What am I not understanding?
For example:
<table>
<tbody class="category" id="cat-1">
<tr class="category-head">
<th>Category 1</th>
</tr>
<tr class="category-item">
<th>Item 1</th>
</tr>
<tr>
<td>This is a desc...
In the example of jQuery's find()
(the doc is at http://api.jquery.com/find/)
I wonder why we need it, because, is
$('li.item-ii').find('li')
the same as
$('li.item-ii li')
essentially, all the <li> elements inside the <li> element that has the class item-ii
Similarly
$('#id1').find(".class1 #id2")
is the same as
$('#id1 .cl...
So I get a set of form elements that I want to extract the values from, by using
var inputs = $("input.row_2");
inputs[0].val()
When I run this, I get told that val is not a valid method.
What am I doing wrong?
Should be an easy one..
Thanks!
...
I have a pretty complex chat application going on, and there are multiple chat panes, chat entries, chat submits, etc. going on in the same window. At first I was going to do something like....
<input type="text" class="chattext" id="chattext-42">
<input type="text" class="chattext" id="chattext-93">
<input type="button" class="chatsubm...
The following works fine:
$(function() {
EnableDisableButtons();
$('#TextBox1').keyup(function() {
EnableDisableButtons();
});
});
function EnableDisableButtons() {
var len = $('#TextBox1').val().length;
if (len == 0) {
$("#Button1").attr("disabled", "disabled"...
Seriously. The simplest jQuery code ever simply isn't working.
<script type="text/javascript">
$(document).ready(function(){
$('.codeswitcher').click(function() {
alert("You clicked it");
});
});
</script>
And then, in my page structure, I have this:
<div class="codeswitcher">
<img src="http://mysite.com/images/codeswitch...
Hello,
I need some JQuery selector help...
My HTML is
<div id="Manager"><span>LastName, FirstName (UK)</span></div>
<span id=ctl00_PlaceHolderMain_g_4118aa1d_2690_4da8_b2b2_dc1943e73968_LineManager/>
I need to select the text from the div Manager and copy that into the span which contains the text LineManager.
I have the selecto...
Hi,
I have searched but cannot find the jQuery selector that gets an element by a title. So I would be trying to get a handle on the dropdown with title =='cars'
Eg:
<select title='cars'>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi...
I want to get all labels inside a div, the blow piece of code works in Firefox and not working IE. Any idea. Thanks in advance.
<div id='discounts'>
<label id="discount1"> discount 1</label>
<label id="discount2"> discount 2 </label>
<input type="text" id="discountmisc" value="" />
</div>
var selectLabels = {
getLabels:...
Hi,
I'm wondering if this is the most elegant and efficient way of doing this?
I have multiple 'tag' lists, and through CSS, I want the tags to appear inline (display: inline) and be comma-separated. The challenge that I'm having is to append commas to all but the last list item in each ul.tagList:
<ul class="outerList">
<li>
...