jquery

modify all html of a certain class

i have this <p class="comment_date" title="a">c</p> <p class="comment_date" title="b">b</p> i want put the title in the html of any element. so i try with this: $(".comment_date").html($('.comment_date').attr("title")); But it's wrong how i can do it? thanks ...

jQuery Hover Problem

Hello. I have a HTML structure like this: <ul id="carousel" class="jcarousel-skin-photos"> <li><a href="images/content/featuredPhoto.jpg"><img src="images/content/featuredPhoto.jpg" alt="Lorem Ipsum Dolor Sit Amet..." /></a></li> <li><a href="images/content/featuredPhoto.jpg"><img src="images/content/featuredPhoto.jpg" alt="Lorem...

jQuery issue with :first-how to solve

I have a span tag in html and this <span> can appear multiple times on the page. I want to select only the first span tag. I am doing it like this var $myvar= $(".mydiv .indiv .myspan:first"); For now its working fine. I think my code will prevent the browser from traversing the whole DOM, as I am using :first, which will improve pe...

jQuery: get certain element from selector

i searched the docs and couldnt find it :( let's say i'm selecting all elements like: var items = $(".myClass"); it returns eg. 5 items - now how can i grab select eg. the 2nd one? items(2) or items[2] doesnt work .. ...

How to pass values of a form to the sever with Ajax and Jquery?

How to use Ajax and Jquery to send all the values of input elements within a form to the server? The input elements are dynamically generated so a list of input names in an Ajax post is troublesome. So is there an elegant way to do it? ...

problem with jquery dim effect

I'm trying to get dim effect when a small image is clicked on and show a larger image, <div id="main_content"> <div id="press_page"> <div id="press_images"> <img id="s1" class="small" src="images/press/small/press1.jpg" /> <img id="s2" class="small" src="images/press/small/press2.jpg" /> ...

jQuery: Save an array of elements to cookie

I'm making a jquery plugin to create 'spindowns', you can locate the project at http://github.com/c00lryguy/jquery.spindown.js The plugin works perfectly, but the only way I could figure out how to save which elements were expanded was to save an array filled with the expanded elements inner text. Now, there are obvious downfalls to th...

jquery hover navigation button, fadein div on another div

Hi little stuck on this jquery. I have a banner above my nav bar, which is a list. Ideally, when I hover over a li in the navbar, I would like a "caption" to slide in on top of the banner div. I guess something like: <div id="banner"> <div class="home_caption">This is Home!</div> <div class="about_caption">This is About!</div> </div...

jqDock (jquery Dock) issues. Spacing and images being "smushed"

I am using the jqDock from wizzud.com/jqdock and I was hoping that someone here had some experience with it. Here is what my dock looks like: My first issue is that my client is INSISTING that the dock should fill the entire width of the page, but nothing that I change makes that happen. The dock stays the same width no matter what ...

PHP Combo Box JQuery - Remove value on page load

Hi Guys I posted a similar question but this is slightly different. I need to scan all the text boxes on a page (there will be around 100, all with dynamic names in the form [ROW]) and then remove matching values from a drop down. I've played around with this a lot and a) can't get the windows.load function to fire in IE (Firefox is ok)...

Using append to create multiple instances of datepicker

I have managed to get multiple instances of a jQuery datepicker working fine using a commonly used technique (can't post link as only allowed 1 link as a new user) The uploaded image probably explains better what I am trying to achieve, using the append function I'd like to duplicate a row (with all input fields for the new row blank) w...

Getting element inner text ONLY when an <img /> tag exists inside using jQuery 's html()

I'm trying to get the html inside several elements like this: <div class="option s12 pointer"><img class="fl mt2" src="http://web.iboomerang.com/icons/fff/magnifier.png" /> Trainings by date</div> Is there a way to strip the tag (like PHP's strip_tags does) and leave only "Trainings by date". Note: I need to avoid using functions li...

jQuery verification of select list contents

Is it possible using jQuery to verify if the following HTML select list contains any items? HTML Select List of Countries which will initially be empty and may remain so unless populated. <select size="5" name="Country" multiple="multiple" id="Country"> </select> ...

How can I compact/minimize/pack my javascript?

Possible Duplicate: What do you use to minimize and compress JavaScript libraries? Sometimes you'll see two different files like "jquery.1.3.2.js" and "jquery.1.3.2-min.js". The "min" version has all the whitespace and comments removed. Is there a tool that will do that for me or do I have to do it manually? ...

jQuery ajax call image loading

Hi!, I wonder if any of you guys knows how to show an ajax loading image on a jQuery $.ajax call, only if that call is taking more that a specific time. Thanks for any help! cheers ...

Jquery Cycle and Effects inside each Slide

I want to create a carousel using Cycle with the following effects: The slides fade in or slides when user clicks a prev/next button When the slide finishes loading, there are text and images in each slide that I want to animate as well with a slide in or fade in effect. Questions: 1. How could one do it so that the transitions are s...

What methods can I use to rearrange the order of javascript function execution?

How to rearrange javascript function execution order independent of include order. A question that assists, but doesn't completely answer my question: Can you have multiple $(document).ready(function() sections? (The answer is yes, and they execute in the order that they are added to jQuery.ready()). I am trying to make my javascript ...

how to find a dynamictly created <style> element?

I'm creating a style element like this : function createMyStyle(selector , rule){ j$("head").append('<style type="text/css">' + selector + '{' + rule + '}' + '</style>'); } Now, I don't want to create this element every time, but to find out if this element was inserted already, and then use something like this to add my rules to ...

How To Access jQuery Event Without Using Anonymous Callback Parameter

Hello all, Typically, when needing to access an event, you do so via the parameter specified in the callback function: $button.live("click", function(ev) { // do something with ev here, like check 'ev.target' } But instead (for reasons too complicated to get into here), I do not want to use an anonymous callback function, but inste...

catch 'hover' event while dragging

I'm using jQuery-ui draggable and droppable in my page. basically I'm implementing an accordion, where you can drag an item from one section and drop in another. I don't use jquery-ui accordion - I simply want to reveal the relevant section and hide the others when the time is right (when you hover over a section header while dragging). ...