jquery

jQuery slider bubble

Does anyone know how to get a bubble to appear above the jQuery slider control when the user is moving the slider pointer? Ideally I'd like to have both pointers in a range slider have their own independent bubble. The bubbles will dynamically show the currently selected value of the slider pointer being moved by the user. It's a tough o...

jQuery 2 error messages being returned but only need 1 to display

Ok I have 2 error messages being return which in turn displays 2 messages of the same thing. how can I only show one message? jQuery.noConflict(); jQuery(document).ready(function(){ if (jQuery("span.errorMessage").length > 0) { var $this = jQuery("span.erro...

Is there a way to check what fonts are installed on machines via the web?

Is there a way to test what fonts are installed or maybe a way I can read out all of them? I want to do a survey in our product to see what fonts I can use on our projects. ...

jQuery filter dropdown

Ok I have a drop down of countries and only want to display USA and Canada I'm looking at something like this but don't think I'm doing this right // Filter Countries $('#selectId').filter(function() { return $('#option').val() == ('USA' || 'CANADA'); }); Example HTML: <select id="country"> <option value="AFG">Afghanistan</o...

Disabling page zoom in IE7 (jQuery/JS)

I know this is not the best thing to do in view of accessibility, but I have a genuine need to disable the user from zooming onto the page using CTRL+ in IE7. I got it working for the other browsers the following way, but IE7 seems to ignore the "return false": $(window).keydown(function (e) { alert('key is down'); // this fire...

Insert text into textarea with jQuery

Hey, I'm wondering how I can insert text into a text area using jquery, upon the click of an anchor tag. I don't want to replace text already in textarea, I want to append new text to textarea. Thankyou. ...

Browser back button and dynamic elements

I have a page that uses jQuery to create a number of <input> DOM elements dynamically based on what user picks from a <select> box. Let's say the user picks 4 from the select box, my script dynamically shows 4 input boxes. The problem is when the user refreshes or goes back to this page (with the browser back button). The elements tha...

Why JQuery Form submitHandler does not refresh its callback?

I am using the JQuery Form Plugin, the JQuery validation plugin and the jqTransform plugin. I have a hidden form which I make visible to add or edit stuff. Edit or Add actions trigger the next function call. function activateAddForm(formId,callback) { $('#'+formId).jqTransform().validate({ submitHandler: function(form...

define a string of animations as a variable

Is it possible to define a string of animations as a variable? For example (this is what I think, but doesn't work?): var speed = 500; var dothis = $("#div").slideUp('speed'); $("#div").slideDown('speed'); $("#div").animate({height: "0px"}, 'speed'); $("button").click(function () { $(this).dothis(); }...

jQuery UI Sortable -- How can I cancel the click event on an item that's dragged/sorted?

I have a jQuery UI Sortable list. The sortable items also have a click event attached. Is there a way to prevent the click event from firing after I drag an item? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <script type="text/javascript" src="http://ajax.googleapis...

Progressive enhancement, behavior when pages are not fully loaded yet

Hi all, I'm developing sites using progressive enhancement implemented completely in jQuery. For instance, I'm adding onclick event handlers dynamically to anchor tags to play linked MP3 files "inline" using SoundManager and popping up Youtube players for Youtube links, through $(document).ready(function()). However, if the user click...

Ajax star rating resets when focus lost (jquery)

Hi Guys, I am using following code for ajax rating system jQuery.fn.rater = function(url, options) { if(url == null) return; var settings = { url : url, // post changes to maxvalue : 5, // max number of stars curvalue : 0 // number of selected stars }; if(options) { jQuery.extend(settings, ...

CSS/Jquery to show hide submenu

Hello, still trying to figure out jQuery and I need some help with a sidebar list. I am editing this after trying some stuff. I am trying to have the submenu hidden until a specific list item is moused over, then another menu appears to the side of the sidebar and you are able to mouse over those selections. I am halfway there but wh...

Using Javascript in an element with injected HTML in jQuery

Hi, I'm trying to reference some javascript files in a remotely loaded (injected) HTML file via jQuery's .load() function. The javascript files I'm attempting to utilize in the loaded HTML file are already included in the loaded HTML's parent HTML page. Initially, I thought that making references to these files in the loaded HTML woul...

outerHeight is not a function?

Dear all; Having trouble with this jQuery function: $("#content").siblings().each(function(i){ heightOfSiblings = heightOfSiblings + this.outerHeight(); }); Error is 'outerHeight is not a function.' What am I doing wrong? Thanks! ...

Jquery working in Firefox but not Internet Explorer

I'm using the jQuery Cycle plugin (malsup.com/jquery/cycle/) on this page: http://artandculturecenter.org It works as expected in Firefox and other browsers, but NOT in any version of IE that I've tried -- browser displays all the divs rather then cycling through them. I'm assuming this is because jQuery isn't working/loading at all bec...

JQuery apply bind to all children

I have: $(document).ready(function(){ $("#eventsContent").children().each(function(){ $(this).bind("mouseenter", function(){ $(this).css("background","#F5F5F5"); }); }); }); I have tried this a couple different ways, but this is the jist of what i've done. I have a container div with numerous divs within it. I want to bin...

Non-anonymous function for jQuery: $( ..selector.. ).click( myFunc())

I've been exploring the use of custom functions for event handlers. In this stripped down example, I'm trying to get an alert to pop up when the user clicks a button. But the alert box pops up immediately as the page loads! What am I doing wrong? ( the commented portion does the exact same thing). If I define the bclick() function...

How can I make an HTML table sortable with javascript without loading data via AJAX?

How can I make a table sortable using javascript without loading data via AJAX? More specifically, I'm looking for a solution that gives me the following: Works on a plain old HTML table Makes columns sortable using a natural comparison Is agnostic of server-side technology (should be portable regardless of whether the tables are bein...

How do I parse XML from PHP that was sent to the server as text/xml?

I have a client-side script written in jQuery that is sending text/xml data to the server, but I can't figure out how to parse the request since the data is not a query string variable. The jQuery looks like this: jQuery.ajax({ url: "test.php", type: "POST", processData: false, contentType: "text/xml", data: xmlDoc, ...