jquery

jquery sortable/draggable double event firing

I have some drag & drop code which works fine as it is. Just have a little query. I've noticed that if I add an alert within the drop function for debugging purposes (eg. alert(draggedItem.text());) it fires the alert twice when I drop something into the draggable area. I've read in another post that using droppable & sortable together c...

Jquery Internet Explorer compatibility (toggle and animate)

Why this small piece of jQuery code is not working on Internet Explorer? IT works fine in all the Webkit browsers. $('#logo').toggle(function() { $('#about').animate({'top': '-400px'},'slow'); }, function() { $('#about').animate({'top': '0px'},'slow'); }); CSS: #logo { margin:-55px auto 0 auto; cursor:pointer; } #abo...

Implementing a graphical select list using icons via jQuery or other

I am implementing an HTML form. For one of the fields (weather) the user must choose one of a set of options (sunny, cloudy, rainy, etc.) So basically I'm looking for a nice replacement for <select> or <radio> that provides a series of images (that I will provide) for the user to select from. I'll create dulled/greyed versions of each...

Save Images into Sql Server Database Table using asp.net 4.0 ajax

Hi, I have a form where users are able to upload images to the website. The images are stored, binary, in the table. I use ajax and jquery on the site and it is never reloaded so when a users enter the data and push submit the page is not reloaded instead I use ajax to upload the the data to the server. When i just passthrough text it...

add url in jquery accordion

I'm having trouble with jquery accordion menu. I want ONLY the text "Chewable Oraldolphilus" go to a url. The requirement is that it should work with click not mouseover. Right now when you click anywhere next to a link it goes to a url instead of just expanding the accordion. Please advise. Thanks. http://www.maxihealth.com/test/accord...

How do I strip the font Tags in Jquery

$("#txtcode").autocomplete({ minLength: 1, source: "/AC/student.php?searchMode=''&Stno="+$("#txtcode").attr("value"), select: function(event, ui) { var label= ui.item.label; var value= ui.item.value; var stuArr = label.split('-'); alert(stuArr [1]); $('#tx_stname').val( stuArr [1].replace(/\$/...

how do you know if document is ready

I have a JavaScript that generates HTML blocks. This script is sometimes called somewhere in run time, and sometimes before document is loaded. I want a script that is able to tell if document is ready. If so, generate the HTML, otherwise, add a document.ready() function. What is jQuery's best way to know if document has been loaded? ...

jQuery UI Autocomplete JSON bug

When you have a remote datasource and min character limit, typing a few letters, deleting them, then typing the same ones gives no results. You can see this on the example: http://jqueryui.com/demos/autocomplete/#remote - try typing 'pi' (get results), delete it and type it again (no results). Can anyone fix it or work out how to log th...

jquery strange behaviour when toggling (hiding/showing) droppable panels

I have several draggable/hideable boxes based on the code posted here: http://webdeveloperplus.com/jquery/saving-state-for-collapsible-drag-drop-panels/ I also have an area with a list of blocks which I can drag into any one of these boxes, and then sort them. This works fine. It's only when I start toggling these boxes, or moving their...

jQuery loop ul li

What's wrong with this? I'm trying to hide all empty li. $(document).ready(function() { $("#details li").each(function() { if ($(this).length == 0) { $(this).css({ display: "none" }); ; } }); }); Markup: <ul id="details"> <li>Lorem Ipsum</li> <li>Lorem Ipsum</li> <li>...

jQuery DataTables Plugin Not Alphabetizing My First Cell Column

Everything is working nicely except upon load and sort clicking for the "Product" column, it's not alphabetizing the column. Instead seems like it's grabbing the URL from the anchor href and sorting it that way. Any tips on sorting it by using the content in between the ? I'm fine with tossing a in there for easier targeting via js. ht...

jQuery validation plugin validating html control only

Hi guys, I'm developing a form with client side validation using jQuery validation plugin. This almost works perfect but i'm getting a problem: The form is composed by 5 inputs. One input requires the content of other input(that must be valid) to proceed the validation, i show one example: $('#submitionData').validate( { ...

jQuery grid plugins that support continuous scrolling with on-demand lazy loading, instead of page navigation buttons

I'm currently considering various jQuery grid plugins, found through a mixture of Googling and looking at previous questions on SO. I specifically want to avoid the traditional "page navigation buttons" syndrome. I want the scrollbar to be able to move the user through the entire data set, and for the plugin to asynchronously request mo...

jQuery draggable(), on drag perform a dynamic function

I have a jQuery draggable() function and on drag is executing several other functions based on an if. Something like this: $("div.element").draggable({ drag: function() { if (a=1){ function1(); } if (a=2){ function2(); } if (a=3...

jquery how to fire the same event every 5 seconds

Hi all, I've built a simple carousel with left and right scroll. Now I want to scroll automatically every 5 seconds. Here's my code: function carousel(){ $j('#carousel_ul li:first').before($j('#carousel_ul li:last')); $j('#right_scroll img').click(function(){ var item_width = $j('#carousel_ul li').outerWidt...

JQuery ajax and dom issue

I am using JQuery to add a row to a table. Within the row is an element who's click event I am capturing: $(document).ready(function() { var newRow = "<tr> ... </tr>"; $('tableName > tbody:last').append(newRow); $(...).click( function() { // click event on newly inserted elem in the row alert("click"); }); } This ...

How to dinamically delete a div and clear the memory so I could add a new div with the same ID but different content using jQuery?

I am using the Picasa Web Integrator (PWI) code, wich allows me to present a picture gallery using a picasa account. Using a form the user writes a keyword and then a code creates a div and calls for the PWI. It works perfectly, but I'm trying to add a "back" button in order to let the user select a different keyword without refreshing....

FullCalendar and qTip. Help with description as array

I have problem with load description. I'm getting answer via ajax this is JSON part information: {"id":"","start":1282561200,"end":1282564800,"title":"admin admin","description":[["Alcatel-6850, ","Alcatel-6400, "]]} This is code to rendering event: eventRender: function(event, element) { element.qtip({ content : ...

How do I perform complex, server-side form validation with JQuery/Ajax (and Rails)?

I'm building a Q&A app on Rails with a lot of complex validations (e.g. a user can't vote on his/her own questions, or vote on the same question twice, etc). I've been using Ajax+JQuery to update things on the page if the request goes through, but want to flash helpful error messages if there are problems. While I have no problem with cl...

jquery check if xml element has children?

I know how to use JQuery to iterate over the children of an xml element: $(this).children('tag_name').each(function() { }); Is there a convenient way to simply test if an element has any children? Something like this incorrect code: $(this).hasChildren('tag_name') //returns true or false ...