I need to bind the click function on each div of this ordered list in order to make hide/show an image on each imgXX div, I'm newbie with JQuery
<ol id='selectable'>
<li class="ui-state-default">
<div id="img01" class="img">
<div id="star01" class="star">
<img src="../ima/star.png" height="30px"/>
</div>
</d...
I've written some javascript using jQuery to replace any select lists with a div and ul alternative so that it will give me some more styling control and make the drop downs look the same cross browser. The below code works 99% for me but I have one issue. At the bottom of the code I have had to use .delay() to tell the code in a way to ...
Hello,
I would like to loop trough nested objects. here is my code :
var defaults = {
toolTips: {
printVersion: {
toolTip1: {
link_s: '#mm_tooltip1_link',
tooltip_s: '#mm_tooltip1'
},
toolTip2: {
link_s: '#mm_tooltip2_link',
t...
Hi All
When using the each() function in jquery for a group of, let's say, 3 radio buttons, how do I retrieve the 3rd button so when it's checked something happens?
Basically how do I choose the element I want to work with from the each() function?
Here is my coding:
HTML:
<form id="orderDefinition" name="orderDefinition">
<fieldse...
Hi,
i have a problem with the each function.
HTML
<div id="d1" class="line1"></div>
JS
$(function() {
tt = new Array();
tt['id_32'] = new Array("32", "gudfgws", "htdfgss", "0", "gudfgdgfs", "0", "halder", "0");
tt['id_35'] = new Array("35", "TVdfg.xml", "154", "Was läuft jetzt im TV", "0", "simpsons", "0");
tt['id_36'] = new Arr...
I am trying to create new div element and then change it`s position with Jquery.But J query effects only first element.I want to change all elements position with different number.
<div class="userList">
<?php $categories = find_category();
foreach($categories as $category): ?>
<div id="user">
<img id="<?php echo $category['cat_id...
Hi,
i have a problem with the jquery each method.
My Object
first_obj = {};
first_obj[11] = new Array('http://blub.de', 'hsdfe', 'hsdfe' );
first_obj[54] = new Array('http://blub.de', 'sdfe', 'hsdfde' );
first_obj[99] = new Array('http://blub.de', 'sdf', 'sdfde' );
Get Results and insert it into the object "second_obj_results"
...
Hey everyone,
I have an idea of how I might do this but I was wondering if anyone had a better thought or could help me out. I have an unordered list with a varying number of images dynamically generated within them. I'd like to add the width of each image and set the containing unordered list width to that value.
For example, if thr...
I have a few divs that are created using PHP. The anchor within the div always has a HREF, even if it is blank. Basically, I am trying to detect if the HREF is blank. If it has content, do nothing, if it's blank, strip the text out, delete the anchor, them put the text back in.
Here is the div:
<div class="title">
<a class="article"...
Hi,
how can I abort the jquery each function?
$.each(big_test_object, function(i)
{
// some code
});
Thanks in advance!
Peter
...
I want to read data records from a non-seekable stream in Ruby. I want to leave it up to the user whether the current record should be skipped or read. Usually you would include Enumerable and provide the necessary methods for it to have an iterator in Ruby, but in my case data can be skipped and only one iteration is possible, so I'm no...
I have a very strange issue with a simple set of jquery stmts. I have the following in my jsp
$(document).ready(function() {
alert("in doc ready");
$("input[name='receivingOption']").each(function() {
alert($(this).val());
if($(this).val() == $("#deliveryMethod").val()) {
alert($("#" + $(this).attr("id") + "label").att...
I've got some p tags with the class PointsToggle
<p class="PointsToggle">POINTS STATEMENT - AVAILABLE 7AM TOMORROW</p>
<p class="PointsToggle">SOME OTHER TEXT</p>
And some jQuery like this
$('.PointsToggle').each(function() {
if ($(this).text = 'POINTS STATEMENT - AVAILABLE 7AM TOMORROW') {
$(this).css('width', '510px');
}
else ...
I am using jquery and the each function but I am having trouble finding the last item in a ul list.
DATA:
<ul id="1">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<ul id="2">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<ul id="3">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
I have tried multiple things bu...
I can't get this to do what I want it to do! I'm trying to replace large images with smaller ones for mobile browsers.
Here is the code:
function js_imgs() {
if (document.documentElement.clientWidth <= 600) {
$("img").each(function(){
if ($(this).hasClass('big')) {
var preSrc = $(this).attr('src'...
I have two lists .album and .favorites
First I was using this each() loop to compare the .album items against the .favorites
When there is a favorite copy in the .album list I append a favorite icon.
$(".album li").each(function(index) {
var itemSrc = $(this).find("img").attr("src");
if ( $(".favorites li img[src*='" + itemSrc ...
Hi there,
I have an issue, where by I am doing a simple form validation, that needs some custom stuff that the validation plugin could not do for me. Basically, I have a name, email and message field, all are required, but only email is really validated, the others just need to check if theyre not empty. Here is my current code:
$("#c...
$(function () {
var ptitle = $('div.portfolioItem div.image img').attr("title");
$(this).each(function () {
$('a.play').attr({
'title': '' + ptitle + ''
});
});
});
Well there's my code, it works but I'm not really familiar with the each tag.
All this does currently is applies the first 'ptitle'...