jquery

flash reappears on refresh

I show flash messages in my rails app using javascript (essentially every flash message is an overlay div). The following partial is included in my main layout file and it takes care of displaying the flash. I notice that if I refresh a page, the same flash message keeps reappearing. Anyway to get rid of this? I know I can call a flash....

DOM element position based on view

How can I get position of an element based on view? So as viewer scroll I get different values. jQuery is prefered. ...

jQuery Ajax request to local disk with IE takes too long

I have an application which is javascript and HTML to be delivered with about 500 short (18MB) videos on 2 physical discs. I'm making an ajax request to check a file exists before displaying it, if it does not I prompt the user to insert the other disc. video.innerHTML = "<p class=\"no-video\">Working...</p>"; $.ajax({ url: "movi...

What Is The Difference Between Pub/Sub And jQuery Data-Link?

A popular topic at the jQuery conference in Boston this month was the idea of Pub/Sub - http://www.bennadel.com/blog/2037-Simple-Publication-And-Subscription-Functionality-Pub-Sub-With-jQuery.htm A common example of what one may use PubSub to do is tracking for a piece of data changing value in order to execute some other event. As far...

jQuery $(document).ready() not firing

Hi all, Using jQuery 1.4.2 from Google hosted Code. Is there a reason why the following javascript does not fire all 3 document.ready functions when the document is ready? The first $(document).ready() function, which renders headers, and the second, which gives a 'Foo' alert box triggered, but subsequent ones in new <script> blocks ...

jQuery Validation on Dynamically created controls

Good Day, I'm using an ASP.NET Repeater control to create rows of textboxes. I'm able to capture the value of the textboxes, but I would like to validate that all the textboxes have a value inside. Is this possible to do in jQuery? TIA, coson ...

jQuery HowTo Toggle Animate?

Hello I'm working to slide a DIV to the left (off the page). ... I have the following which works: $('.mybigbox').live('click', function() { leftDistance = $(this).attr('name'); // set px so I know how far $lefty.animate({left:leftDistance}) // Makes the slide }); What what I want to happen, is on the first click it animates with ...

How to normalize HTML in Javascript or jQuery?

Tags can have multiple attributes. The order in which attributes appear in the code does not matter. For example: <a href="#" title="#"> <a title="#" href="#"> How can I "normalize" the HTML in Javascript, so the order of the attributes is always the same? I don't care which order is chosen, as long as it is always the same. UPDATE:...

JQuery .get error when drag item inside droppable elment!

my part of code: function orderFileInfoMWindow(event){ event.preventDefault(); //var orderFileInfoMWindowPanel = $('<div class="orderFileInfoMWindowPanel"></div>').appendTo('body'); var orderFileInfoMWindowPanel = $('<div />',{'id':'orderFileInfoMWindowPanel'}).append($('<div />',{'class':'orderFileInfoMWindowPanelHeader'...

How to execute jquery action only when the previous finishes

$("#show-sidebar").click(function () { $(this).fadeOut("fast"); $("#sidebar").animate({ marginLeft: "0" }, "fast"); $("#content").toggleClass("full"); }); What I wanto to do is, I guess, pretty simple: For each of this actions to execute, I need it to wai...

Detecting touch screen devices with Javascript

In Javascript/jQuery, how can I detect if the client device has a mouse? I've got a site that slides up a little info panel when the user hovers their mouse over an item. I'm using jQuery.hoverIntent to detect the hover, but this obviously doesn't work on touchscreen devices like iPhone/iPad/Android. So on those devices I'd like to r...

How to enable and disable div click event on ajax succeed

Hi , I have four divs on a popup and each click makes a ajax call to the back end and paints the right hand side. All four clicks are div by id clicks. When user clicks on div i want to disable the other three divs till this ajax complete. Once the ajax succeeds i want to enable the click events for the other three divs. Like that i wa...

Troubleshooting ASP.Net caching - CacheDuration property seems to have no effect

I'm trying to get ASP.Net to cache the response of a web service request by setting the CacheDuration property of the WebMethod attribute: [WebMethod(CacheDuration = 60)] [ScriptMethod(UseHttpGet = true)] public static List<string> GetNames() { return InnerGetNames(); } The above is a method on an ASP.Net page (I've also tried mov...

jQuery ajax tries to send cross domain and gets 403 foribben but its on the same domain

Im trying to do an ajax call to my php file on the same server. I found a url fetching script similar to Facebook to get links. http://wakeupzee.netai.net/99points/facebook_url_extracting/ Works pretty good actually. Anyway, I want to save the info it's extracting to the DB. When I pull the src of the img link, somehow Im getting a 403 f...

$.post does not submit data

$("#contact-us-form").submit(function () { var nameVal = $("input[name=name]").val(); var companyVal = $("input[name=company]").val(); var titleVal = $("input[name=title]").val(); var emailVal = $("input[name=email]").val(); var phoneVal = $("input[name=phone]").val(); var messageVal = $("input[name=message]").va...

simple jquery plugin to upload a file via jQuery (Ruby on Rails)

Hello, I'm looking for a simple jquery plugin to upload a file without FLASH. For Ruby on Rails. Single file upload progress bar indicator and all the bits have been uploaded. ...

jquery :: animation/timer pausing?

Hi there, I have setup a jquery based marquee, This works perfectly fine until I have attempted to add in pausing the marquee on hover. On hover it pauses it fine, But upon resuming there is a gap after the current marquee. What would be causing this? A working example is at: http://202.78.151.195/marquee.html The javascript is at...

show data after two textfield are filled

i have a form, that consist of: <input type="text" id="model"> <input type="text" id="serial"> <input type="text" id="lot_no"> <select id="line"> beside that i have data in settingdata table: Model Serial Lot_no Line abc 0001 012a 1 abc 0101 022a 1 i want if i type abc in #model ...

jQuery UI AutoComplete - How to implement progress-indicator?

If the question title wasn't clear enough: I am using the jQuery AutoComplete plugin (part of jQuery UI 1.8.5) I would have thought the supplied CSS/images would include an ajax-like progress image? If not, what's the easiest way to create one? This is my autocomplete code: $('#query').autocomplete({ source: function (request, re...

Update drop down selection with radio button selection using jquery

So this is a follow up to this post. I need to replace some dropdown menus with radio buttons without modifying the HTML. In the post I linked earlier, someone came up with a really clever Jquery solution that successfully replaces the dropdown menu with radio buttons and updates the dropdown selection when one of the radio buttons is se...