jquery

jquery: Flash messages

With jQuery, how can I display a flash message at the top of the page in an easy way? Is there something built-in, or a plugin, or is it easy enough to do it yourself? What I mean is like after a successful ajax post I would like to just say "hey, it went good" in a non-obtrusive way. ...

tabs using jquery

I currently have a tabbed system in place, however it not doing exactly as I need it too, I was hoping that by navigating to the URL with #tab2 suffixed on then end it would navigate to my tabbed page and the tab that is present in the URL would be the one that is active, however the first tab in the sequence is always active, is there a...

jQuery conflict with body onload event

I have a strange conflict in my code. I have a function that called from body onload: var someGlobalVar=new SpecialType(); function OnBodyLoad() { someGlobalVar.Bind(); } But when I include jQuery 1.4.2 in my project I get an error that someGlobalVar is undefined. Why is the global variable undefined now, and what ways are there t...

How to disable form submit if the username is not available

I have checked the user name availability. The problem is, even if the username is not available, the form is posting. Edited Code: <SCRIPT type="text/javascript"> $(document).ready(function(){ $("#emailch").change(function() { var usr = $("#emailch").val(); if(usr.length >= 3) { $("#status").html('<img src="imag...

Finding out event that called a CGI script

What I want is to be able to make my CGI script do different things depending on what action initiated the calling of the script. For example, if one button is pressed, a database is cleared. If another button is pressed, a form is submitted and that data is added to the database. Should I be doing something like adding the name of the...

jQuery - Cycling through child elements

Hi, I have a series of select boxes within a table like so: <tr> <td><select></select></td> <td><select></select></td> <td><select></select></td> <td><select></select></td> </tr> With about 10 rows. I'm trying to reset all of the select boxes in the row to a default value, but having trouble with the syntax, can anyone help? This i...

Automated horizontal scrolling in jQuery

Hi there, I'm looking for a jQuery plugin which does scrolling the element (div) when I hover the arrow, it should look like this: http://img42.imageshack.us/img42/5716/scrollp.jpg and scroll automatically the content inside to the left/right only when user hovers arrows. Is there anything like this? Thanks a lot, Jakub ...

JQuery autocomplete problem

Im using JQuerys Autocomplete plugin, but it doesn't autocomplete upon entering anything. Any ideas why it doesnt work? The basic example works, but not mine. var ppl = {"ppl":[{"name":"peterpeter", "work":"student"}, {"name":"piotr","work":"student"}]}; var options = { matchContains: true, // So we can search inside string...

Web Standards alternatives to Flex/Silverlight (I mean serious alternatives, not just JS framewoks)

Is there a set of open standards technologies that I can use to achieve the same way of development as in Flex and Sivlerlight? I am talking about componentization, separation of concerns, rich graphics, states and effects . Please point out some tutorials and other resources if possible. P.S. I KNOW that this is technically possible, s...

How Do I Prevent a XSS Cross-Site Scripting Attack When Using jQueryUI Autocomplete

I am checking for XSS vulnerabilities in a web application I am developing. This Rails app uses the h method to sanitize HTML it generates. It does, however, make use of the jQueryUI autocomplete widget (new in latest release), where I don't have control over the generated HTML, and I see tags are not getting escaped there. The data f...

asp.net/jquery - Countdown timer not working

Here is the full code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head runat="server"> <title></title> ...

Page loading effect with jquery

Hello all, Is there a way to use jquery (or other method) to display a loading div while page loads? I have a table that is populated using PHP/MySQL and can contain several thousand rows. This is then sorted using the tablesorter plugin for jquery. Everything works fine, however the page can sometimes take 4-5 seconds to fully load an...

jQuery Loading Status for $.ajax

Hi All, I am using the following code to get data from the database( from cs page itself i am creating the html code) and binding the html code to the div. Problem: If the database size is higher it takes some time to show the result. thet time i want to shoe a loading.gif image in that location. Once it get the data i have to hide t...

Jquery - Jquery Wysiwyg return html as a string

I am using the Jquery Wysiwyg editor and I am trying to capture the html that makes up the content area to store in a DB. Is there anyway to get html of a element and save it as a string? My code looks like tihs <iframe id="wysiwyg_IFrame"> <html> <head></head> <body> <ul> <li>This is a test...

Disable dynamically a jquery plugin

Hello, I use the jquery numeric plugin to allow only numbers to be typed in some fields. $("input.numeric").numeric(); I want to disable this function dynamically in some cases, to allow the user to type others characters (i.e. letters). I tryed to use the unbind() or undelegate() functions without success. Does anyone know the solu...

Missing } in XML expression

I have an external javascript file that I want to, upon include, write some HTML to the end of the web page. Upon doing so though I get the error Missing } in XML expression on the line that uses dropdownhtml. Here is my code var dropdownhtml = '<div id="dropdown"></div>'; $(document).ready(function(){ //$(document).append(dropd...

Jquery search and apply css styles

I want to modify the titlebar jquery plugin showcase, I added the <p class='title> to the description tag so that I can apply css styles to the title and to separate that portion to the actual description. Script: var $a = $("<a />").attr("href", $container.find("a:first").attr("href")).html("<span>" + $container.find("a:first img").att...

Seeking jQuery demo of sort and reorder like iPhone icons

I'm trying to duplicate the drag and reorder action of the icons on the iPhone screen. I want to rearrange divs on a page basically. Like in flickr when you organize your images... you drag one and others make room for it. The gap where you removed it from closes up. I want to do the same thing with divs that contain data. I did find o...

trying to hide options from selectlist .. not working on chrome and ie

Hi, I have a select lists, which has lots of option. Depending on some input I want to hide few options from select list. To hide options from select list I have written jquery like $('#selectlist1 option').each(function(){ $(this).hide(); }) But this code seems to work only for firefox and its not working on chrome and ie. Wh...

Is there a better acts_as_commentable for Rails?

Here's what I'm looking to do. I have a site where I want the user to be able to leave comments on various Models. acts_as_commentable is the obvious starting point for this, but I'm curious if there is a gem / plug-in with a more robust feature-set. For example: Pre-built partial(s) (w/ or w/o Twitter / FB buttons) Partial(s) that uti...