jquery

Jquery .load and subdomains

I am trying to load a file (http://domain.com/v2/inc/review.php) from a subdomain (http://resort.domain.com) using jquery. Although I use the full location it refuses to load. Does anyone know how to get it to work? $("#resort").load("http://domain.com/v2/inc/review.php"); ...

jQuery: Insert html from "title" tag into a "span" of a H2 tag

Hey guys, Say I had the following HTML: <h2>Heading <span></span></h2> <ul> <li><a href="#" title="I am wanting to be in H2!">Something</a></li> <li><a href="#" title="I too am wanting to be in H2!">Something else</a></li> </ul> I want to be able to take the title tag from the and place it inside the span of the h2. How can I do so?...

closing an unordered list

On a website, I want to display the main navigation as an unordered list. After 3 items I want to close that list and open a new one, so it eventually looks something like this: <div id="navigation"> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> <ul> <li>4</li> <li>5</li> <li>6</...

Using Jquery $getJSON How do I dynamically create data for the [data] parameter after Url param?

I have no problems getting the Json to work and parse the json return. I was just wondering how I could build a dynamic "whatever data is" and stick it into [data] to pass my parameters from there and not manually append them to the url. From jquery website example: $.getJSON("test.js", { name: "John", time: "2pm" }, function(json){ ...

Getting the position of the element in a list when it's drag/dropped (ui.sortable)

Hi, I have a sortable list like this one: http://jqueryui.com/demos/sortable Is it possible to get the start and end position of the element in the list, when it has been moved? I'm talking about their position number, in the list. For example, if I move element 2 to position 5 in the list, I'd like to assign those two numbers to vari...

How does JQuery work with files

Can JQuery/JavaScript read/get the file content on the client side, where the file is an image or a text, and store it in a variable? EDIT: can the file putted in the be handled on the client?? ...

A text shows up smoothly when hovering thumbnails. Is this a jQuery plugin or just CSS?

I don't know the exact words to describe this behavior in the following pages: http://kyanmedia.com/ and http://www.jayhollywood.com.au/. When you hover the pictures (thumbnails). A text shows up smoothly. Is this a jquery plugin or just CSS? How to reproduce that behavior/effect? ...

With jQuery and I need help getting individual table row titles attributes from an xml file

I'm usig tablesorter jQuery to parse this xml file <?xml version="1.0" encoding="iso-8859-1"?> <CATALOG> <CD> <TITLE>Title 01</TITLE> <ARTIST>Artist 01</ARTIST> <COUNTRY>Country 01</COUNTRY> <PRICE>10.00</PRICE> <YEAR>2010</YEAR> <INFO>Tooltip Info 01</INFO> </CD> <CD> <TITLE>Title 02</TITLE> <...

jQuery DOM manipulation

I have different php output in jQuery-based tabs. This output is formed from database and it consists of several <div>'s. Every time I click any tab it sends AJAX request to the php script which performs "SELECT" request and gives result back as response to AJAX request from the tab. $(document).ready(function() { $('ul.tabs li')....

unable to apply jquery filter

Hi I m un-animating a list using this code... function unanimate_li() { $li.filter(':last') .animate({ height: 'hide', opacity: 'hide' }, 1000, function() { unanimate_li(); }); $li = $li.not(':last'); } I have set up the li using this code $li = $("ol#update > li"); $li = $li.filter(':gt(4)').filter...

Confusing rails div id naming

I have started using jQuery and rails. I have made a simple form that submits to the database and updates the page without reloading with ajax. In my jQuery functions I used $"#new_comment" for the id name (in my application.js and create.js.erb files) but on my places/show view file, I named the div "add_comment" and it works.. I rena...

Focus on input field with value

Hi, I am focusing on an input field with jQuery: $("input:text").focus(); There is already some text value in the input field. When I focus, the cursor blinks right after the last letter, how would I put the cursor right in front of the first letter? ...

jQuery/JSONP widget and jQuery version conflict

I would like to create a widget so that my visitors can display it on their blog/website. I would like to use jquery and jsonp to develop this widget. I know how to avoid conflicts between jQuery and other libraries (like prototype). But what will happen if jquery is already installed on my visitors' websites and if their version is d...

need help with jquery selector

I have a following HTML : <ul class="someclass"> <li id="1"> <button type="button" class="grey"></button> </li> <li id="2"> <button type="button" class="grey"></button> </li> <li id="44"> <button type="button" class="grey"></button> </li> <li id="54"> <button type="button" class="grey"></button> </li> </ul> Now here is what I'm trying...

Jquery, Jcarousel smooth infinite scrolling

Hi all, I am using jcarousel to auto scroll some images. I would like to know how to make them scroll in one fluid scroll with no pauses or stops. Currently there is a pause and then it scrolls again. If I am not making myself clear then ask and I will try to explain a little better. This is the code: jQuery(document).ready(function()...

Jquery child elements

When I add event handler to a some elements using query: $('div').mouseover(function () { }); Iinside function I have an element for which we add event function ($(this)). how can I check inside this function next: Have this "DIV"($(this)) child elements "DIV"? Have this "DIV"($(this)) child ...

Default values of parametrs for own functions in jquery

Is it possible to set default values of parametrs for own functions in jquery? ...

Using jQuery to parse an RSS feed, having trouble in firefox and chrome.

I used a jQuery library called jFeed to parse and display my blogs rss feed on my personal website. It worked perfectly well at first, but upon checking later it simply displays nothing, except in Internet Explorer, where it seems to work fine. After checking the javascript console using Firebug in Firefox, it shows an error in the 'XM...

jquery remove selected element and append to another

I'm trying to re-append a "removed option" to the appropriate select option menu. I have three select boxes: "Categories", "Variables", and "Target". "Categories" is a chained select, so when the user selects an option from it, the "Variables" select box is populated with options specific to the selected categories option. When the ...

JQUERY AJAX, Issues with spaces being sent to the server, Why?

I'm using the following code to post to the server which is then sent to a MYSQL query to find matches via search. $.ajax({ url: '/search/spotlight/', data: "q=" + $(this).val(), success: function(data) { } }); When Q's val has spaces in it, it's creating problems. I'm wondering if I'm handling this correctly? Do I need to encode the ...