I'm having some trouble figuring this out. I have an unordered list menu that I want to style all the last elements with a folder icon and style all the expandable (parent) elements with a plus.gif image. I wanted to simply change the class by using .addclass() using jquery, which will contain the css to add the background-image. My j...
I've been using jquery 1.3.2 to pull snippets of html (including script) from a server. A typical response might be:
<div id="content"><div id="inner">...
<script type=...> alert("hello world");</script>
<p>Hello World</p>
</div></div>
I've been using the query .get function:
$.get($(this).attr("href"), function(response) {
$(...
if a user types in an input say 3 into a text box three small text boxes should be shown below or in a popup through javascript or jquery .How can this be done...
<input type="text" name="order">3</input>
Thanks..
...
Hello, I have a set of selected elements in jQuery:
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div c...
If I have groups of checkboxes like so:
<input type="checkbox" name"checkboxes1" value="#value1">
<input type="checkbox" name"checkboxes1" value="value2">
<input type="checkbox" name"checkboxes1" value="#value3">
<input type="checkbox" name"checkboxes2" value="value1">
<input type="checkbox" name"checkboxes2" value="#value2">
<input ty...
I have the following DOM:
<div class="qtip qtip-light qtip-active">
<div class="qtip-wrapper">
<div class="qtip-borderTop"></div>
<div class="qtip-contentWrapper">
<div class="qtip-title">
<div class="qtip-button"></div>
**Text I need to extract**
</div>
<div class="qtip-...
jQuery: how to create a new div, assign some attributes, and create an id from some other elements attributes?
How can I accomplish this. What I've tried below is not working and I'm unsure how to make it work.
What I'm trying to do is create a div and assign it some attributes, then append this div to all the < li > elements that are ...
I'm trying to implement a basic jQuery infinite carousel. As much for the learning process as for anything else (as a rule I'm not a fan of re-inventing wheels, but...I have to learn somehow, might as well start with the basics).
I've managed to get the list to animate left happily enough, but I'm stuck when it comes to selecting the fi...
Hi All,
I am stuck with a small problem here.. What i am trying to do is copy description of id's from one table to another. I have writter half of the javascript and can anybody tell me how to convert this function in jquery. I want the description copied from the first table based on the id to the second table. Have done this in jquer...
$(".sectionHeader").click(function() {
var row = $(this).parent();
while (row.next().length != 0) {
row = row.next();
if (row.children().first().is('th')) return;
row.toggle();
}
});
...
This is my code
$(document).ready(function () {
$("#Button1").click(showDialog);
});
var showDialog = function () {
/* Something I do here */
}
Here the "Button1" click event fire at first time, after that the event was not firing.
Thanks,
Ram
...
Hi,
I've seen lots on how to do this with an tag, and I have no problem doing it with that one, but I can't seem to retrieve the href attribute of a <link> tag.
Even trying to grab the link tag at all:
alert($("link").length);
Gives 0.
Any ideas?
Thanks,
Matt
...
In the following code,
<script>
function val()
{
//get alltextarea to validate
}
$(document).ready(function() {
var html= '<form>'
html += '<textarea name="test" id="test"';
html += '<textarea name="test1" id="test1"';
html += 'form';
$('#get_div').append();
});
</script>
<div id= "get_div"></div>
<input type="button" ...
I have an image map in my page:
<div id="books">
<img src="images/books.png" width="330" height="298" border="0" \
usemap="#map_books" />
<map name="map_books" id="map_books" alt="books">
<area shape="poly" coords="17,73,81,288,210,248,254,264, ..." \
href="/about" alt="books" />
</map>
</div>
I have a function that...
Um, why no worky? Trying to toggle a ul with this:
$("#others").children(".btn").click(function(){
if ($(this).children("ul").is(":hidden"))
{
$(this).children("ul").slideDown();
} else {
$(this).children("ul").slideUp();
}
});
And:
<div id="other">
<div id="galleries">
<a href="#" class="btn">Galleries >> ...
In the below code,the textaraes are generated dynamically ,now how to get these values for validations in valid() function..
<script>
function valid()
{
//get all textarea vales for validation
}
function add(col_det)
{
var row = '<tr>';
row += '<td>';
row += '<textarea rows = "8" cols = "8" class = "input" W...
I'm trying to pull in a filename.txt (contains html) using ajax and change the src path in the data variable before I load it into the target div. If I first load it into the div the browser first requests the broken image and I don't want this so I would like to do my processing before I load anything onto the page.
I can pull the src ...
I'm using Jeditable for in-place editing. One the controls I am working with has the select type. When a user clicks on the field, the following select control is generated:
<div id="status" class="editable_select">
<form>
<select name="value">
<option value="Active">Active</option>
<option value="Ina...
Can anyone explain why the following jquery only fires the 2nd toggle event and how to fix it? Specifically, every time I click the nested < a > element it brings up the alert "2nd click".
I tested the selector to make sure it was selecting the element properly and it does, or at least it inserted a class without any problems.
The sel...
The following bit of code breaks in the upgrade to jquery 1.4:
$().mousemove(
function (e) {
defaults.mouseX = e.pageX;
defaults.mouseY = e.pageY;
});
};
What appeared to be a reasonable fix was adding "html" as the selector, ex: $("html").
The fix works fine - except now when the user mouses off the page, it doesn't ...