jquery

jQuery: selector question (classname with space)

hi all, i'm trying to get a div which has "panel current" as classname. the problem is the space - how can i select it? thx ...

jQuery + XML problems

I've been trying to grab the Digg rss feed and parse its contents into a table as an intro to working with jQuery / XML. I took this webmonkey example and tried to customize it. Here is my js file: // File: readXML.js // Start function when DOM has completely loaded $(document).ready(function(){ // Open the students.xml file...

jquery addClass not working on tablecell

Hi, I need some help with this I am trying to do this if(perc>0){ alert('change backgroundcolor and textcolor'); $('#stocktable tr td:last').addClass('stockhigher'); } but It does not work on a tablecell I also try'd to set the selector like this $('#stocktable tr td:eq(2)).addClass... $('#stocktable tr td.percentage').addClass...

JQuery / $.get is not displaying my data

Hi there. In the example below, the alert dialog box is not displaying at all. Any ideas why? $.get('http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Earth%20Day',function(data) { alert("DATA LOADED: " + data); }); ...

search for url in textarea as user types then trigger function

Hi, What i'm trying to do is search a textarea while the user is typing for a url beginning with http:// then if found, fire a function, and stop searching for an url. I know this can be done with jQuery but I'm having quite a few issues with :contains, indexOf, regex, etc. heres a bit of code to explain what I'm trying to do! $(docu...

$.get(u,d,c,"JSON") vs $.getJSON(u,d,c)

I generally use $.get() and $.post() for all of my asynchornous calls, but they're usually qualified with the final parameter being "JSON," indicating that I'm expecting to handle JSON data within my callback. Is there any benefit to using $.get([url],[data],[callback],"JSON") over $.getJSON([url],[data],[callback])? Is it nothing more...

Possible to move an Absoulte position if another absoulte position is already on that spot?

Hi I am trying to make a calendar on my website. So in my C# code I make all the table cells for that calendar(I return it as a string of html into my View). While doing that I check my database to see if any tasks go in that cell and loop through it till no tasks are left. I then move on to the next cell and do the same thing again. H...

Jquery. Why this works?

Can you explain why this http://www.sebastiansulinski.co.uk/demos/jquery_show_hide/ works? There is all classes the same, but when you click open, opens only one text. Why? ...

use POST data in jquery callback

the code below is a jquery POST request javascript. i want to use the data I am posting in the callback function. if u take a look, $('#fb_user_msg').innerHTML = data.comment; the above line is trying to include the comment in the html (unsuccessfully). i am sure this is easy but I dont know why I am not getting it right. $("#submit...

Are you sure you want to delete?

I just wrote a confirm delete function that requires a class name: jQuery(document).ready(function($) { $('.ConfirmDelete').click(function() { var question = $(this).attr('title'); if (question == '') question = 'Delete this record?'; return confirm(question); }); }); Usage: <input name="Delete" type="...

Webdesign idea - clicking an image converts to background image using jquery?

Hey folks, I've got this idea. In a webpage design, after clicking an image i want it to merge with the background (in a washed out watermark sort of way). Essentially from an img, it has to go to a background image. Is this possible with jquery? A solution i could think of is having both a background image and the front image initiall...

jquery and remembering url attributes??

Hi! In index page I manage categories by just putting in url /?cat=mycat attribute. Now, when user clicks a link which start jQuery update. First inserting data in SQL and if success then $("#indexPage").load('updateIndexPage.php') where contains query of index elements from database. Now, I can't get that to fetch urls attributes (in ...

jQuery children of cloned element not responding to events

Summary I am using jQuery to clone a div ("boxCollection") containing groups ("groupBox") each of which contains a set of inputs. The inputs have change events tied to them at $(document).ready, but the inputs inside the cloned divs do not respond to the event triggers. I can not get this to work in IE7, IE8, or FF3. Here is my sam...

Is it possible to update the name of each checkbox in an html table using jquery

i have a html table where one of the columns is a set of checkboxes There are three checkboxes in each row. The original names of the checkboxes are Row 1: person[0].Choices (value=1 name= person[0].Choices value=2 person[0].Choices, etc. .) Row 2: person[1].Choices(value=1 name= person[1].Choices value=2 person[1].Choices, etc . ...

How can I add extra partial views, depending on a dropdownlist selection, in ASP.NET MVC and jQuery?

I have a form to which I want to add extra fields depending on the value of a dropdown list. They would be sets of fields and I was thinking on dynamically changing a div's content with the html from a render partial, which would render a PartialView with the fields I want. Right now the code for the drop down list is the following ...

Scrolling effect with the destination highlighted with jQuery

I found an anchor plugin for jQuery, and its demo site is at http://www.position-relative.net/creation/anchor/. I am developing a FAQ page on a website where a list of questions are followed by a list of answers. I could use the scroll effect to move down to the corresponding answer when a user click a question. But I also want the answ...

Problem with jQuery index()

There must be something simple I am missing. I'm trying to get the index of the element but keep getting -1. HTML: <div id="rating_boxes"> <img src="/img/ratingbox.gif" class="ratingbox" alt="Rate this Speech" /> <img src="/img/ratingbox.gif" class="ratingbox" alt="Rate this Speech" /> <img src="/img/ratingbox.gif" class="ratingbox" a...

Filter based on multiple classes using JQuery

Hello, I have this script that basically will show a product or products based on the class names. So if the li has a class name of 'c2' it will show product c2, if the li has class names 'b8f b12r a12 ps10' it should show all those products b8f b12r a12 ps10. The issue I am having is its only filtering/showing the selectors with a sin...

AJAX file upload with Symfony

I am using Symfony 1.2.9 for a project, and I need to use AJAX to do file uplaod. I have not found a way of doing this yet - despite days of googling. I am using JQuery and prototype as my javascript frameworks. Can anyone provide an example of how to upload a file using AJAX, in Symfony? ...

Delete Last Char of String with Javascript

I have a DIV with some characters. How can I remove the last character from the text with each click on the DIV itself? ...