jquery

I unable to access dom.

I'm using jquery $.ajax to load my table row data like <table id='row-data'> <tr><td>1001</td></tr> <tr><td>1322</td></tr> <tr><td>1551</td></tr> <tr><td>2341</td></tr> </table> in above code i load all with $.ajax but after load data when i fire any event on then it's not working so how to possible to access these r...

Custom CakePHP order by clause for jQuery autocomplete

I have a database of locations the user can select from by typing and autocompletion. In my CakePHP controller, I do this: $locations = $this->Location->find('all', array( 'conditions' => array('Location.name like' => '%'.$term.'%'), 'fields' => array('Location.id', 'Location.name', 'Region.name'), 'order' =>...

how do i implement a jquery background messages?

for example when you get a new badge on stack overflow, you get the notifaction message on the top, telling you have a new badge, it deos that on the backgroung!! is thier a toturial or article that can help me with this kind eventing updates!! ...

Jquery: Select the next nested input

I have the following code: <td><input class="publish" id="publish_company_ids" name="publish_company_ids[]" type="checkbox" value="1" /></td> <td><input class="discard" id="discard_company_ids" name="discard_company_ids[]" type="checkbox" value="1" /></td> I'd like when I click the first checkbox, the second checkbox to become disabl...

jQuery / Javascript - run AJAX request after X seconds

Hi so I have this code: $('input.myinput').each(function(){ var id = $(this).val(); var myajax = function(){ $.ajax({ url: ajax_url, type: "GET", data: ({ code: id }), beforeSend: function() { }, error: function(request){ }, success: function(data) { aler...

Save state of Widgets in ASP.NET MVC using jQuery and Json

I am using ASP.NET MVC in C# I have a page where the user can move different Widgets around the page, and I now need a method to save the state of the widgets. I am using jQuery in the HTML page, and the jQuery posts the new page layout using JSON. I am unsure how to read the JSON in the controller. The code I'm using is based on this...

Jquery: How to disable an image's click function while loading?

This won't work using: $('div#menuBar,#goLeftBtn,#goRightBtn').attr('disabled', true); in the document.ready Any ideas? Thanks! EDIT: My html is basically like this: <div id="floatRight"> <img src="./images/all_left.png" id="goAllLeft" class="arrow" /> <img src="./images/left.png" id="goLeft" class="arrow" /> ...

Show/hide lists using a slide animation?

Hi, I have a list. When the user performs some action, I want to replace all the list content, but present it as if the new list data is sliding in from right to left, with the old list data being pushed off to the left. Example: <ul id='content'> <li>red</li> <li>green</li> </ul> now when the user pushes a button for example, I'...

jQuery Micro Templating

After reading Rick Strahl's blog post I created a few templates myself and I just have one question though. Lets say I return the same JSON object but I want to generate different UI for different purposes (dropdown lists, tables, etc), would I have to create a template for each type of UI or is there a neater solution? ...

adding/removing classes with jquery in a web questionnaire

I have a web questionnaire. Its a series of questions with a series of answers alternitives for each question. Each "answer alternative" is an asp input button. Whenever a user click a button, that button recives a new class and removes that same class from the other answer buttons of that question the user wishes to answer. the class c...

Use javascript/jquery to modify edit-body field when editing a drupal node

Hi, I'm trying to manipulate the edit-body field with javascript just before I save a node in Drupal and can't seem to modify the content with consistent results. I used the following example code: var oEditor = FCKeditorAPI.GetInstance('edit-body'); htmlstr = "<p>Hello World</p>"; oEditor.SetData(htmlstr); And sometimes my changes ...

jQuery Ajax facebook like system

Hi, I am trying to create a Facebook i like don't like functionality using jQuery. I am having the following problem. When the ajax call fires up, it brings up the loading animation. When it ends the animation stays there. The only way that it disappears is when I use the same div for loading and for the result. Have a look. The code...

jQuery: having trouble specifying minDate and maxDate for a datePicker

I'm trying to enforce choosing only dates between (today minus a week, today plus a week) but instead getting a datePicker with past dates disabled and unrestricted future dates. Any idea? (I'm new to jQuery, 2nd day of playing with it...) thanks! I isolated the code to clearly repro it: <html> ...

jQuery - Why .att doesn't replace the attribute value?

Hello all, Based on the manual as follows: http://api.jquery.com/attr/ attr( attributeName, value ) I should be able to replace the attribute value of a selected element. <div id="keynote1Fld" class="row "> <label for="keynote1" class="labeloptional">Topic 1</label> <div class="collecti...

Jquery Disable Next button until animation finishes

This is cool and I am familiar with this. However I want the next and previous buttons to stay visible, just not be click able. In my particular situation, the buttons are images that are part of the design. I just want the user to not be able to click through before an animation ends. ...

jquery selectors

Hi, Im am struggling with trying to figure out a selector for this kind of html <input type="hidden" value="2.0" name="A_ITEM-AMOUNT[1]"> Im trying to filter alot of these lines with a jQuery expression but has no luck in my matches ( either too much or no match at all). I'm using the following jquery string. $("[id$='aform']").con...

JQuery trying to insert html of h3 into a DDL dynamically?

Yet another bit i'm stuck on $("div.evenprop .locname").each(function() { $("#ctl00_dd1 option").val(".locid").html($(this).clone()); });​ <select id="ctl00_dd1" name="ctl00$dd1"> <option value="HANW"></option> <option value="HEYD"></option></select> <div style="displaY: none;"> <div class="evenprop"><h3 class="locname">Hanworth<...

[jQuery] $.post() as a bookmarklet XSS.

Just curious if anyone can explain to me why I can request a page from a bookmarklet like this one: javascript:var%20s=document.createElement('script');var data=encodeURI(location.href)+encodeURI('\n\n')+(encodeURI(document.getElementsByTagName('body')[0].innerHTML));s.setAttribute('src','http://example.com/remote.php?id=68&amp;act=new&...

How do I add a exception to the document for a menu system, using JQuery?

Hi All, How do I add exceptions to the document? For example within DIV(.rtmenu) I want to exclude links with the class (a.menu-arrow). So if I click/mousedown on (a.menu-arrow)...the DIV(.rtmenu) doesn't fadeOut? $('.rtmenu').live('click', function(e) { e.stopImmediatePropagation(); }); $(document).mousedown(function() { $('.rtmenu')...

Javascript and jQuery - Advanced sequential animation

Hello, I hope somebody could help me out, I have no idea how to solve this problem. so first, here's a php array: http://pastie.org/private/s99d8w7cbhjd2yucdijw if i do print_r for mysql ID=1, it would be like that: http://pastie.org/private/5b9n86dnxlp96afpiwvjeg now i'm pushing data to javascript: var sec_0_f = []; <?php foreach (...