I have the three following lines and the first two line gets all the images on the document and hides all, but then when I add the third line shows all the images.
What I need its to hide only the images with the attribute alt=minimize and alt=maximize but for some reason hides all the images.
$('img').attr('alt', 'minimize').css("disp...
The issue I am having is:
How do I go from a variable pointing at a dom element to using CSS selectors?
I want to make this work:
function highlight(table)
{$(table " > :even").toggleClass('highlight');}
where table is a reference to a table element.
I don't want answers that tell me to use $('#table') because that defeats the poin...
I display elements in a hierarchy, clicking one displays the next set of elements in the hirearchy. Each element has a tag called "level" which has some value which is 1-.... (whatever the number of levels is for that branch of the tree).
When an element is clicked I want the next elements to be displayed, but if an element is clicked a...
I'm kinda new to jQuery but understand it for the most part. My problem is that when my ajax call which refreshes the entire div is done, all my dynamically created forms don't work. If you try and submit them, the event doens't work properly and just tries to do a normal form submit. I have all the other items such as links bound using ...
I want to filter the autocomplete results based on the selected option in a select input.
sample json data:
[{"ContactId":"8590051631","ContactType":Company,"Name":"Test },{""ContactId":"8590049225","ContactType":Person,"Name":"TestName}]
here's my markup
<div>
<select class="type">
<option>Person</option>
<option>Company</option>
<...
What is wrong with this jQuery selector?
$("#masterHeaderMenu.masterHeaderMenuButton a:first")
I'm intending to select the first anchor tag that is a child of an element whose class is "masterHeaderMenuButton", itself a child of the element with an "id" attribute value of "masterHeaderMenu".
Can't I do this in jQuery?
...
I have the following html code:
<ul>
<li class="O">
<label for="radio1">Radio 1:</label>
<input type="radio" name="radio1" value="Yes" checked>Yes</input>
<input type="radio" name="radio1" value="No">No</input>
</li>
<li class="O"...
I have some contents inside div tag...
within that div tag content I have to search for img src tag value
based on that value i have to highlight some images and to show some div content
for example
if img src value contains "http://google.com/test/test.img" have to highlight and to show img is highlighted div content
if img src va...
Hi.
I have this piece of HTML
<div id="fileTreeInviati">
<ul class="php-file-tree">
<li class="pft-directory">
<a href="#" class="" name="101">A006 - SOMETEXT (<span name="contaNew"></span>)</a>
<img src="./moduli/home/images/info.png" title="Informazioni Azienda" class="imgInfo"/>
<ul style="display: non...
Hi,
I'm trying to have a comment input field that will show the submit button on a dynamically created form when you click on the input field.
Similar to how facebook comments work. When you click on the input field the submit button appears and when you click off it disappears.
All the comment input id's are comment_1 etc and the subm...
Hi, I have like this.
$(document).ready(function() {
var $clickable_pieces = $('.chess_piece').parent();
$($clickable_pieces).addClass('selectee'); // add selectee class
var $selectee = $('.chess_square.selectee');
// wait for click
$($selectee).bind('click',function(){
$('.chess_square.selected').removeClass('selected');
$(...
Hi
I have the below functions in regular javascript creating select options. Is there a way I can do this with JQuery without having to use the form object? Perhaps storing the options as an array of json objects and parsing this in the calling function...
function populate(form)
{
form.options.length = 0;
form.options[0] = new Option(...
This should be real easy. Given below is the HTML.
<div id='attachmentContainer'>
#Attachment#
<span id='spnAttachmentName' class='hidden'>#AttachmentName#</span>
<span id='spnAttachmentPath' class='hidden'>#AttachmentPath#</span>
</div>
I want to get just the #Attachment# and not the other text. When I tried
$("#attac...
for the following html
<div>
<div class="col1" >
I dont want to select this
</div>
<div class="col2">
I dont want to select this
</div>
<div class="col1">
I dont want to select this
</div>
<div class="col1">
I dont want to select this
</div>
<div class="col2">
...
I am currently using this code to add a class to every other row in my table.
$(".stripeMe tr:even").addClass("alt");
However, on another table I'd like to add a class to rows 3,4, 7,8, 11,12 and so on...
Is this possible?
...
Hi, I have a selector:
$("input[type='button'][onclick^='save']")
and it works in FF but on IE...
There is something wrong with onclick selector part. Is there a way to make cross-browser workaround?
Thanks Pawel
edit:
$("img[src$='scroll.gif']").click(function(){
var targetOffset = $("input[type='button'][onclick^='save']...
Hello fellow coders,
I have a question about setting the style attributes for a data cell in the jQuery.DataTable. I was able to set the width for each column when initializing the dataTable using the following:
oTable = $('#example').dataTable( {
"aoColumns" : [
{ sWidth: '40%' },
{ sWidth: '60%' }
]
} );
...
What I'm trying to achieve, is to output a json list that contains a list of Css classes, and their corresponding url records, i.e.
var jsonList = [{"CSSClass":"testclass1","VideoUrl":"/Movies/movie.flv"},{"CSSClass":"testclass2","VideoUrl":"/Movies/movie2.flx"}]; //]]>
foreach item in the list I am adding a click event to the class.....
Hi
I have a un-ordered (ul) html list. Each li item has 1 or more classes attached to it.
I want to go through this ul list and get all the (distinct) classes. Then from this list create a list of checkboxes who's value matches that of the class and also who's label matches that of the class. One checkbox for each class.
What is the b...
I have several select boxes and textboxes with the same class and I have the following statement.
UPDATED
//This goes through each visible tr of the table with class notEmptyTable
$('.notEmptyTable tr:visible').each(function(index) {
//This checks that the elements with class checkTextBox1IsNotEmpty its not Empty.
if ($('.check...