jquery

Javascript works in FF / IE but not Chrome / Safari

I'm working on a Drupal 6 module where I use jquery (and more specifically, the $.ajax method) to retrieve a RSS feed from Yahoo's weather API. I decided against using the JFeed library because I need access to the elements with "yweather" prefix (and I couldn't find a way of accessing them via JFeed). I decided to use the $.ajax method ...

Serialize unique form from page of many for AJAX. Works in FF/Safari, but IE serializes ALL forms on page

I have a page of similar items, each in their own form I want to update using Ajax. For each item, I append a counter onto the end of the form id, so each form has a unique id. I also store this "counter id" as an attribute in the submit element, so I can dynamically build the form name in JQuery. It works perfectly in FF win/mac and Sa...

JQuery + Asp.Net MVC, passing float number.

I'm working with MVC recently and I've encountered a strange problem while trying to send request to my controller using ajax. I'm using JQuery (version 1.3.2) that came directly with MVC, I'm trying to send such ajax request: $.post("Home/OpenTrade", { price: 1.5 }, function() { }, "json"); I've also tried parseFloat("1.5") instead o...

Jquery Cycle Questions: Pause on load + Hover Action

Hey Guys, building a site and I've got two questions for you. The site is hosted here for the time being: http://wesbos.com/tf/shutterflow/?cat=5 . I have two questions:1. Currently the slideshow rotates divs with the class of .slide that holds the image. inside it, a class of .cover overlays it with the data/ a semi-transparent backgro...

JQuery - Parsing through classes then using an if statement to modify just one

I'm trying to apply a class to a link only if the current page equals that link. I find the current page with: var pathname = window.location.pathname.split("/")[window.location.pathname.split("/").length - 1]; This grabs the url of the page and saves whatever is after the last /, which in the case of my page is 'index.html'. Now, ...

Pushing value of Var into an Array

I know this is probably a simple question, but I'm attempting a tweak in a plugin & js is not my expertise and I got stumped on how to do the following: I have an array that can contain a number of values ($fruit) depending on what a user has entered. I want to add another variable to the array that isn't determined by manual input. I...

JQuery: getting the value/text/innerHtml of a checkbox in an ASP.NET CheckBoxList control

I've got a bunch of checkboxes generated by an asp.net CheckBoxList control. I want to get the text the user sees next to the control on the page. With similar controls, like RadioButtonList, I've been able to get their values in jQuery by doing this: var selected = $("input:checked[id*='" + Control.id + "']"); and then looping thro...

How to check if an element contains another element in jQuery

I am using xVal combind with the jquery.validate plugin, but have come across a slight problem in that it is posting validation messages twice in a certain instance. I think this bug should be fairly easily fixed with some clever jQuery in the placement of the error message. I am trying to find a way to see if a ul already contains an l...

What is best way to use JQuery in Asp.net

What is the best way to use jquery in asp.net, should I use controls or write inline or mix of both. Controls are easier to use and save time and Writing jquery in page give more control but take more time. Not all (I mean commonly used) plugins are supported by controls. There are many jquery controls available on codeplex. If you use ...

Is there a preferred way of formatting jQuery chains to make them more readable?

Given this following sample code which clones a table row, sets some properties and then appends it to a table: $("#FundTable").append( objButton.parents("tr").clone() .find(".RowTitle").text("Row " + nAddCount).end() .find(".FundManagerSelect").attr("id", "FundManager" + nAddCount) .c...

Generate random element position and prevent overlapping in JavaScript

I have a holder div on the page where I want to load small images in on random position as a collage with 10px padding on each. How can I make sure that images never overlap each other or holder div? Is there a plugin or function that I could use? My code so far: <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <sc...

how to detect iframe iframe resize

is there a way to detect if content of my iframe has change... my work around is i have a loop which constantly check for the height of the content it effective but not efficient is there another way of doing this? thanks, ...

Save temporary Ajax parameters in jQuery

Hi there, I am developing a heavily scripted Web application and am now doing some Error handling. But to do that, I need a way to access the AJAX parameters that were given to jQuery for that specific AJAX Request. I haven't found anything on it at jquery.com so I am asking you folks if you have any idea how to accomplish that. Here i...

jQuery UI Draggable snap rulers

I am setting up a drag and drop interface using jquery and jquery-ui. I've got element snapping working, which is nice, but now I'm trying to get elements to snap at a distance, using some sort of automatic temporary guide rulers. A very good implementation is on the mac version of Powerpoint. Here's a screenshot of a drag in progress: ...

Can't move focus to the control because it is invisible

Take a look this sample from jqueryui. http://jqueryui.com/demos/datepicker/#icon-trigger it all working fine except for my case, my application can disable the date textbox. So if this textbox is disabled, the user can still click the icon trigger. When user clicks this icon trigger, an error message comes out "Can't move focus to th...

jquery flot: display all data and Y axis hover

Greetings I am a jquery newbie and trying to fix an issue which uses a version of "turning-series.html" from the official flot examples, 1- I am wondering how can I swith it from display selected to display all from my datasets. 2- How to change my options so when mouse over the point, it displays the value of the Y axis ? //My data ins...

Can it be disadvantageous to store jQuery objects in a variable?

I've just recently asked the folloiwng question with regard to jQuery chaning: http://stackoverflow.com/questions/1286829/is-there-a-preferred-way-of-formatting-jquery-chains-to-make-them-more-readable A number of people replied with the suggestion that maybe I reduced the amount of chaining within the statement, and instead stored obj...

How to insert a table after the row of another table using jquery

Hello All, I need to dynamically append table to a row of another table . for eg . I first create a div Then I insert a table after this $('<table id="container"> <tr> <td> </td> <td> <input type="checkbox" /> </td> <td> </td> </tr> </table>') $('<<tr> <td> </td> <td> <input type="checkbox" /> </td> <td> </td> </tr> >')...

AJAX uploading with PHP and Javascript

Hey, I want to dynamically send an upload form to CI via jQuery. The form needs to contain the file to be uploaded and the path to save to. So far my AJAX-call looks like this: file = $('#file').val(); path = active_dir; upload_file( file, path ); function upload_file(file, path) { $.post("/upload_file/", { file: file, path: path ...

How to select a unique DIV and deselect the rest using jQuery?

Hi i am using the "selectable" of jQuery UI and i have multiple divs aligned vertically as a list and upon selecting each div the div's background changes to PINK and when i select another DIV the one selected previously should change to WHITE background. As of now i achieved what i need but the problem is the EACH function. if i have 10...