jquery

Efficient AutoSuggest with jQuery?

I'm working to build a jQuery AutoSuggest plugin, inspired by Apple's spotlight. Here is the general code: $(document).ready(function() { $('#q').bind('keyup', function() { if( $(this).val().length == 0) { // Hide the q-suggestions box $('#q-suggestions').fadeOut(); } else { // Show the AJAX Spinner ...

Add jQuery colorbox plugin to a dynamically created element

The usual way to assign colorbox functionality on a link is like this: $("a.colorbox").colorbox({ transition: "elastic" }); Newly added itmes are not bound in this way though. How can I add colorbox to dynamically created <a class="colorbox"></a> elements too? ...

How can I use jquery to display updates when I detect them in my code behind file?

I have an asp.net application and in the UI I have a jquery plugin called growel. When I detect that someone have changed their account (code behind) I need to call the jquery plugin to display but this is on the client side. But how is this possible, I cant call jquery from code behind code (C#), has anyone a workaround or am i missin...

jquery slideshow/cycle with easing not working

Here is my code, for some reason it isn't working when I add the easing option. It works fine with 'fade'. <script src="jquery.easing.1.3.js" type="text/javascript"></script> <script src="jquery.cycle.all.min.js" type="text/javascript"></script> <style> .pics { height: 383px; width: 582px; padding:...

Advice on displaying and allowing editing of data using ASP.NET MVC?

I am embarking upon my first ASP.NET MVC project and I would like to get some input on possible ways to display database data and general best practice. In short, the body of my webpage will show data from my database in a table like format, with each table row showing similar data. For example: Name Age Position D...

jQuery setTimeout - not working when using to update data

I have a list of thumbnails. When I click on a thumbnail, I want the image to load after half a second. Here's my code: $('ul#thumbs li img').click(function() { setTimeout(function() { $('img#image').attr("src", $(this).attr("src").replace("_thumb", "")); }, 500); }); When I click on one of the thumbs, nothing happe...

jQuery fadeIn/fadeOut loop problem

Hi. I'm trying to do a sequential animation with a loop....but i can't accomplish it in a smooth way (some "lag" problems). jQuery var i = 0; var b = 0; var fades = function(){$(".caja").stop(0).each(function(){ $(this).delay(i * 500).fadeIn('slow', function(){ $(this).delay(5000).fadeOut('slow', function(){ $(".cajar").delay...

A elusive multi level accordion

Hi, I try make a multi level accordion with jquery: HTML <div class="acordion"> <a href="#"><h1>aaa</h1></a> <div class="acoTitulo"> <h1>aaa</h1> <div class="acoSubTitulo"> <a href="#"><h2>bbb</h2></a> <div class="acoSubSubTitulo"> <h2>bbb</h2> ...

problem with ajax post

For some weird reason, the codes below are first working, then website is redirecting to the url. I used this code many times before without any problems, please please advise! <script type="text/javascript"> $(document).ready(function() { $("[name='submit']").click(function() { $.ajax({ type: "...

how to highlight text on hover

By highlight I mean the thing you do to text when you drag your mouse over it. If you use imgur.com then you know what I want. I can't find anything about this anywhere, it's frustrating. help? Edit: Okay, I thought I made this clear enough but I guess not. I don't mean I want to change the background color on hover. That's trivial. But...

Changing the title of jQuery-UI dialog-box with in another dialog-box's function...

Why doesn't doesn't the second jQuery-UI dialog box title change when popped. The first dialog box I change the title of the box with using the following .attr("title", "Confirm") -- it change the title of the first box to 'Confirm', like it should have. Now when the second box pops up it should change the title to 'Message' since did th...

Using jQuery, how can I obtain form data from fields that have been added by manipulating the DOM?

I have a table body that grabs it's rows (and form fields) via AJAX on various events. Everything is working fine, except one part: I can't obtain form data from any of the table's rows after it gets manipulated. I've played around with the live() function, but I can't seem to get the right setup to pull in the form data. Any ideas? ...

No right-click event Firefox 3.6

I'm in the process of porting an app to JavaScript/CSS and it uses right-click. For some reason Firefox 3.6 for Windows isn't issuing a right-click event, but Chrome and IE do. Here's some test code. If you right-click #test then you get nothing in Firefox but you get an alert under Chrome and IE. <html> <head> <title>Hi<...

ajax response redirect problem

When my member registration form correctly filled in and submitted, server responds with redirect link. But my ajax does not redirect the website. I do not receive any errors, where is my mistake? <script type="text/javascript"> $(document).ready(function() { $("[name='submit']").click(function() { $.ajax({ type: "POST", ...

Advice on my jQuery Ajax Function

So on my site, a user can post a comment on 2 things: a user's profile and an app. The code works fine in PHP but we decided to add Ajax to make it more stylish. The comment just fades into the page and works fine. I decided I wanted to make a function so that I wouldn't have to manage 2 (or more) blocks of codes in different files. Rig...

How do I load new pages into my current jQuery colorbox?

I'm having a bit of trouble loading pages into an already-existing colorbox. I have a colorbox opened by clicked a link that is bound by the following code: $("a.ajaxAddPage").colorbox({ onComplete: function(){ $('ul#addPage li a').click(function() { $.fn.colorbox({href: $(this).attr('href')}); retu...

php json jquery and select box

I have this php code $jsonArray = array(); $sql = "SELECT ID,CLIENT FROM PLD_SERVERS"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { $jsonArray[] = array('id'=>$row['ID'],'client'=>$row['CLIENT']); } echo json_encode($jsonArray); And this js function autosearchLoadServers() { $.post("php/autosearch-lo...

Excanvas does not work in IE8 at all

I simply cannot get excanvas to work at all. I have tried everything I can think of. I am even uploading the examples that come with excanvas to my website and testing them and they do not even work. I don't know if it has something to do with my server or what, but I haven't seen a working excanvas image yet. for instance... I this exa...

jquery typeWatch with Dynamic input fields added on the fly.

How can i get the Id of the input field added on the fly? My script adds the input fields on click on the button , using var ix = 1; $(template2(ix++)).appendTo("#dataTable tbody"); var template2 = jQuery.format($("#template2").val()); I also add this , line after the insertion of the new fields, so it adds the typeWatch to all...

getResponseHeader is not a function

I need to get a value from another page. But I get this error with the following code. How can I fix it? $(document).ready(function() { $("[name='submit']").click(function() { $.ajax({ type: "POST", data: $(".form-signup").serialize(), url: "external.asp", ...