jquery

Can this be done with jquery?

Please take a look at this site trmc.org Look at the flash header, can something like that be done with jquery? If so what jquery plug in would work the best? I've searched for image slide shows, but nothing with that effect can be found. Possibly the best method I found is spritely. I look forward to your answers. ...

jquery gt() get current index

I'm using gt() to add columns to a table. I need to use the row number and the column number to build the cell id. Getting the column number is straightforward: var c = $("#gridLayout tr:first td").length; but how can I get the current index from gt() for the row number? $("#gridLayout tr:gt(0)").append('<td>.......</td>'); ...

jQuery 1.2.6 Build HTML Elements In Memory?

I am using jQuery 1.2.6 to build up HTML elements in memory. The image below is a snippet of how I am doing it. When I profile the HTML that is generated, below is what I am seeing. Why is this happening? What about my jQuery is incorrect here? ...

How do I create a new jsTree HTML node with the CRRM plugin correctly?

Here's my situation: using PHP and MySQL as my backend, jQuery and jsTree for my front end. My tree is on the left, and clicking on a node will trigger certain information to be loaded in a box floated to the right of the tree. They can add/edit/remove nodes in this tree with this behavior (no page reload, all Ajax). Currently, I can ...

ASP.Net MVC - Refresh table data every 5 seconds

I am in the design stage at the moment and was wondering how I would update a table every 5 seconds. My table will display read-only data returned from my model. Normally my view would just have <table></table> HTML and then a foreach loop to write out the data. However because I want to refresh this whole table every 5 seconds I am u...

How can I scroll an inline unordered list of images in a div that is page width? (JQuery)

I have a "bar" across the top of my page, 100px hight and 100% page size. I have an unordered list of images displayed inline in there 80x80 (10px padding all round) and I have tried several methods of displaying "more" images than fit on the screen either by wrapping to several lines or by scroll. What I would prefer would be somethin...

How can I add a "Select All" option to a jqGrid select toolbar filter?

I'm building tables using jqGrid with a filter toolbar to let users filter the rows displayed in the table. This is all working nicely if I use text as the search type, but for some columns I want to use a select list to make it easier for users to filter based on the values in the column. I can set the column stype to "select", and pop...

Show tab with url

Hi! I wrote a code that whould change a li's class to active and show the correct content on click but I also would like to be able to link a visitor to example: www.socal.nu/index.php#tab2 to activate tab2. Code: $(document).ready(function() { //Default Action $(".tab_content").hide(); $("ul.tabs li:first").addClass("active").show()...

jQuery get() method - not sure what it does with parameters it receives in this example

Hey all, I read from the jQuery website, that get() loads data from the server using a HTTP GET request. But this explanation doesn't suffice, such as for the example I provide below: Just to give some context for my question, when we assign the value of two parameters to a variable expoptions: var expoptions = $.extend(defaults, opti...

Setting Hidden Field Value to JSON (jQuery/JavaScript)

var c = [{"Id":40,"Action":null,"Card":"0484"}]; $('#hidJson', window.parent.document).val(c); alert($('#hidJson', window.parent.document).val()); // returns [object Object] alert($('#hidJson', window.parent.document).val()['Card'); // returns undefined I'm in a legacy app. I have had to put in a fix where an IFrame needs to get a pack...

JQuery Selector: Select element based on text

I want to select an element based on their innertext in JQuery. Below is my Html <html> <body> <a href="fddf">4</a> <a href="fddf">4</a> <a href="fddf">4</a> </body> </html> I want to select all the <a> tags which has text of "4". Any idea how do I do it? ...

How do I stop firing two events using sortable and droppable?

Hello all, I'm working on an interface for dragging and sorting questions and their choices. I have a toolbar on the right with the available questions/choices and the list of current questions/choices on the left. The list on the left is a droppable and a sortable. The items in the list on the right are all draggable and connected to t...

Tracking successful form completion for POST content in Google Analytics

Hi all, We have a client unable to switch a form from POST to GET, at the moment we're tracking form submissions via an event tied to the 'Submit' button. However, this tracks as a 'completed' form, someone who clicks submit but who might get the form returned with errors. Normally I'd either AJAXify the form and prevent submission of...

HTTPS and Ajax, strange behaviour after tests.

Recently I've been carrying on a series of tests to see how HTTPS behaves with normal requests and Ajax requests in different situations. Here is the tests results (I've been using jQuery to do the ajax calls): When going from a page with Https to a normal Http one, will a popup appear to the user?Result: the ipod touch (IPT from now o...

How do I select an image based on its path/url?

I'm tying to select images based on their URLs, but for some reason it's not playing ball: Ultimately I'm after something like: var imgs = $("img[@src='images/object.png']:not(:hidden)"); But even with something simple like: $("img[@src='images/object.png']"); This error is thrown: "TypeError: Object doesn't support this property ...

How do I select a closest ancestor plus the ancestor's next?

I'm using jQuery to manipulate table rows that are paired within a table. I'm trying to select rows based on found items from my previous jQuery where if the row contains a visible image, I need that row and it's next sibling. I can get the row using: $("img[src*='file.png']:not(:hidden)").closest("tr"); Because I'm also after the s...

Rails helper "Collection Select"

I have the exact same problem as this guy , since no one has answered, I decided to repost: I have been trying to implement this jquery plugin to my app.I need help trying to output something like this <select name="user[university_id]" id="user_university_id" class="selectable"> <option value="1" title="uni1">Uni1</option> <op...

Ternary Operator in JavaScript With Multiple Expressions?

the_styles ? the_styles.appendTo('head'); the_styles=null : the_styles = $('.stylesheet').detach(); Obviously, this isn't valid. Notice the ";" between the appendTo() and the_styles=null. How do I write it on 1 line and still have multiple expressions like that? ...

JSON formatting (Sending JSON via jQuery AJAX post to Java/Wicket server)

I'm using jQuery to post JSON to a Java server, but I think my JSON must be wrong. Here's an example of my data and how I'm sending it: var lookup = { 'name': name, 'description': description, 'items': [{ 'name': itemName, 'value': itemValue }] } $.ajax({ type: 'post', data: lookup, dataType:...

disable cursor/editing but keep ability to focus

Is there anyway to achieve this that works cross-browser? (Keeping solutions to pure JavaScript, HTML, and CSS) I'm using JQuery, so JS in that would be best. (disabled="disabled" doesn't allow focus) ...