keypress validation
Hi Guys + Girls I have an input box which I would only like numeric values, a single decimal point, and the ability to use the backspace key. I currently have the following $("input[id^=yourPrice]").keypress(function(event) { if (event.which && (event.which < 46 || event.which > 57 || event.which == 47)) { event.preventDefault(); } }); This restricts the input box to numerical values and decimal points but I can work out how to allow the backspace functionality or how to restrict it to only a single
[jQuery] $(window).resize event does not fire in IE8
Hey Guys - I am posting this question a second time and apologize if someone answered it in the other thread - I cannot find the post anywhere on this list. $(window).resize(function(){ alert("Stop it!"); }); Is not firing in IE8 - this is the exact sample code provided at: http://docs.jquery.com/Events/resize#fn Any Ideas?
AJAX tutorials
Does anyone know any good site which can teach AJAX using jQuery?
Event affecting all items
I´m wondering why this jquery-code causes all list-items to receive my css. This is my html source: <body> <ul> <li id="eins">Test</li> <ul> <li>Test2</li> <li>Test3</li> </ul> </ul> </body> And this is my jquery $(document).ready(function() { $("li#eins").css("cursor", "pointer"); $("ul").css("list-style-type", "none"); }); I only want to assign the css (cursor, pointer) to list item with id=eins. In FF (2,3) it works. But in IE (6,7) the css is assigned to all elements.
How to create an universe effect?
Need a tutorial to create this navigationeffect http://www.nofrks.com/ any clue?
My first jquery script... Its really buggy
Hi, I have used a few existing jQuery script in the past but they where all pre existing script with a few changes to suit my needs. Recently I have been working a a small project for a friend of mine (she selling t-shirt) I wanted to add a little efrfect on the product page. On the product page there is four T-shirts who come in contact with each other (some parst are hidden) each of these will link to the product page in the shopping cart. In order to make it clear witch of the T-shirt is overed
Trouble after using load() function
Hey everyone, I'm a bit new to JQuery, so I apologize in advance if this is a silly question but... When I inject external HTML into a page using the load() function, how do I make it so that JQuery can manipulate that new HTML? As an example, I have the following code: $(document).ready(function() { $('#bodymain') .ajaxStart(function() { $(this).hide(); $("#loading").show(); }) .ajaxStop(function() { $(this).slideToggle(); $("#loading").hide();
animation question
I am trying to fade a container and then load the content and then fade it back in. However the content loads before the first animation is done. How do I tell it to wait for the animation to be finished before it loads the content.
[jQuery] Style div overflow scrollbar ? cant find jQuery equivalent to this
Hello there, anyone know of any plugin using jQuery that can do something like this? http://greengeckodesign.com/projects/mooscroll/examples/example1/ I want to style or set an image in the scrollbar created when a div has an overflow
Dialog
Hi, I am trying to display a jquery dialog box on click on an asp button. When I click on the button 'close' appears together with the dialog title but it does not look like a dialog box and it disappears after about a second. Can someone please help me? JQuery Code - GenerateDialog.js: $(document).ready(function() { $.ui.dialog.defaults.bgiframe = true; }); function CreateDialog() { $("#jDialog").dialog(); } aspx code: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
[jQuery] [JOB] PHP / jQuery Developers, Austin, TX
My client is a privately owned company which develops content management, shopping cart, knowledge management and email marketing software used by more than 20,000 organizations worldwide including fortune 500 companies (Intel, Shell, GE), enterprise organizations (Virgin, Ubisoft, Monster.com) and also thousands of small/medium businesses and digital agencies. They are seeking PHP 5 Developers at all levels (junior, mid, and senior) with the following skills: OO PHP 5, MySQL, and jQuery a must.
[jQuery] Extra mouseenter for element when removing stuff on top of it
I'm having an issue that my mouse is over an two elements, element a and b. a is on top of b, and b has hover events. If I remove A when the mouse is over it, I get a mouseenter event on b without a mouseremove. Is this a bug? is there a way to work around this? Thanks, Mike
[jQuery] hide labels in Form Validation
Hello All, I'm using the jQuery form validation and want to do three things with the errors: 1.) Make the border of inputs, option menus, radio buttons, etc. red 2.) Remove the Label error messages from the side of the inputs as they DESTROY my style arrangement 3.) Have a single one-line message asking to fill in required fields I saw in the documentation that there's a way to do some of these things but I don't really understand how to implement it as I'm new to JS and jQuery. Thanks! Jared
[jQuery] encode data in AJAX post?
Do i need to encode my data send through AJAX post? Ex. var name = $("input#name").val(); var dataString = 'name='+ name; /////////////////////////////////////////////// $.ajax({ type: "POST", url: "mail.ajax.php", data: dataString, dataType: "html" }); /////////////////////////////////////////////// How can I do an URLecode? thanks!
[jQuery] Animate Variable Concatenate Help
I'm trying to get the width of an element, animate it bigger, then shrink it back to normal size on hover. Here's my function: $('a.slider').hover(function(){ var mywidth = $(this).width(); $(this).animate({width: "240px"}); }, function(){ $(this).animate({width: +mywidth+px"}); }); The line I'm having trouble with is: $(this).animate({width: +mywidth+px"}); I know its not concatenated right, but I tried a few ways and couldn't get it to work. What am I doing wrong?
[jQuery] Cannot get jquery to work
I downloaded the from http://docs.jquery.com/Downloading_jQuery#Download_jQuery and store the script in public/javascripts/jquesry.js I included the file using following command <%= javascript_include_tag "jquery.js" %> I want to add class to table class using following command inside script tag. (document).ready( function() { $('tr:odd').addclass('odd'); $('tr:even').addclass('even'); alert("abc'); //for debugging $('th').parent().addclass('table-heading'); } ); But I cannot get the alert neither
[jQuery] confused about form validation showErrors() method
I am trying to use the showErrors() method as a back up to the client side validation, My form have server side validation that returns a json string of invalid fields and a message for each and I was hoping to use that along with showErrors(). It seems like the only way I can get showErrors() to work is to hard code the string to pass in. if I hard code validator.showErrors({"checknumber" : "The check number is required"}) it works like a charm. but var str = {myfieldnamevar : myerrormessagevar};
[jQuery] form submit during getJSON
I am having trouble submitting a form by clicking on a button "<input type='submit' />" while I am waiting for the callback of the $.getJSON function to fire. Is there a way to allow the form to submit even if the callback is never called?
[jQuery] firefox hover bug with 'title' attribute?
jQuery 1.2.6 and Firefox 3.0.7 on MacBook OS X 10.5.5 If I might renew an unanswered thread: I've encountered this twice now in different contexts. This only occurs in FF, so far as I know. If .hover() is acting on a div that contains an image link, and that link has a title attribute, hover misbehaves by firing when the mouse is moved after a pause. an example of the problem can be seen here: http://home.myuw.net/jjcrump/test/opacity-test.html The first element has an image link with a title attribute,
[jQuery] Confirmation alert fires multiple times with jQuery click
I add multiple items with each click and then I want to remove them one by one by clicking. All is ok, but if I add 2-3 items and the click the first one, confirmation alert fires multiple times when i click Cancel. The number of times depends on how many items goes after curent. Please help to fix that :) Code: ----------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;
[jQuery] CYCLE plugin - text displaying before page fully loaded
Hello all, I'm using the Cycle plugin as an automated slideshow on my homepage. Instead of images, I'm using text. The problem is that while the entire page is loading, the text for the slideshow displays for a fraction of a second in-place. Then Cycle kicks in, and the slideshow starts. I would like the slideshow div to be blank while the rest of the page loads (before the slideshow starts) -- and I can't figure out how to do that. Thanks for any suggestions. [code - Javascript] $(function()
[jQuery] generated content(PHP) into DIV?
Hello Everyone! I have 3 DIV's next to each other. I want that the first div is loaded over jquery with a php file which outputs an unordered list in html. When I click on a list item in the first DIV I want that jquery sends the parameters from the list to a second php file for making an unordered list which is loaded this time into the second DIV. The same should happen from the second DIV into the third DIV whith a third php file. All php files connect to a mysql database which has three tables
[jQuery] three tier horizontal slider.. can this be done in jQuery?
Hey! I come across this wonderful site http://www.weareinstrument.com... and I have been wondering if there is a Jquery way of doing it? The closest way I have come to finding a solution is here http://www.taptaptap.com.. and although this is another good example of a cool website... it doesnt quite do what I want it to do... Ideally I would like a three column page with a fixed navigation down the left... the navigation would dictate a central main div containing information... the third div (the
[jQuery] Incorrect work position and offset
html 1: <body> <div> <table> <tr> <td> <div id="pos"></div> <div id="id1" style="position:absolute;">test</div> </td> </tr> </table> </div> </body> html 2: <body> <div id="pos" style="position:absolute;"> <div id="id1" style="position:absolute;">test</div> </div> </body> When I try to make this: var el = $("$pos"), pos = el.position(); $("$id1").css( { left : pos.left + 'px', top : pos.top + el.outerHeight () + 'px' } ); for html1 everything OK... for html2 #id1 was positioned from #pos use left
[jQuery] Why would an id become undefined?
Are there any debugging tools to trace when/where an element id is defined and then becomes undefined? I'm using: jQuery 1.3.2 with and without the fix at //http://dev.jquery.com/ ticket/4420 http://www.appelsiini.net/download/jquery.jeditable.mini.js http://code.google.com/p/submodal/ (old version v1.1 with a common.js file) scriptaculous 1.8.2 http://www.quirksmode.org/js/detect.html http://yellow5.us/projects/datechooser/ DateChooser 2.9 and a custom call to "events.add(window, 'load', WindowLoad);"
[jQuery] [treeview] suppressing toggle on link click
I'm using the jquery.treeview plugin to build an outline. Each element within the outline has a link to the side of it that runs a javascript function. I'd like to have users click on this without triggering the toggle of the element. Below is a very simple html file that shows the problem- each element has a [+] to the side of it- when you click on that link, in addition to the alert, the group will expand or contract. Any ideas how to suppress that when clicking on the [+], but allow it when clicking
[jQuery] jquery treeview menu problem
Hi, i'm using jquery treeview ( http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ ) menu in my website and i have a little problem: when i open a page from the menu tree, menu expands completely and items alignes to the left side for a while, the time that page is charghing. I don't know why, can u help me? thank you
[jQuery] removing jQuery UI draggable revertDuration
I am using jQuery UI's Draggable plugin to allow the user to drag an image from a box onto a google map to set a marker... the image they were dragging then snaps back to the box it was originally inside of. I'm running the code that updates the map using the draggable's 'dragend' event, but that callback doesn't seem to fire until the draggable has finished reverting to its original position. I've set the revertDuration to 0, 1, and other small numbers, but there seems to be a minimum duration for
[jQuery] .html() causes null IE
Hi, I am pretty new to jQuery and I am using the tablesorter plugin and I am getting a .html() is null or not an object error within a custom parser the code var ts = $.tablesorter; // add parser through the tablesorter addParser method ts.addParser({ id: "empnames", is: function(s) { return false; }, format: function(s) { // make an object of the string
simple scroll bar plugin?
I am looking for a simple scroll bar plugin that works by itself -- i.e., that doesn't scroll anything. I need a plugin that can call functions when the user clicks (or continues to hold down on after a delay) an arrow key or moves the slider, and that has a function allowing setting of the slider at a particular location. Essentially, I'm looking for something like the slider from jquery UI but with arrows too. It should look nice. (If there isn't anything, I'd be willing to pay someone $50 to extend
Problem w/ Time picker plugin
Hello, I'm implementing this Jquery time picker: (http://plugins.jquery.com/project/pttimeselect) and It works perfectly until I try to add a php var to the value of the input tag. Here's my form code: <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> <div id="time_of_day_select"> <label for="time_of_day-field" >Time of Day</label> <input name="time_of_day" id="time_of_day_select" value="<?php echo $presc_data['time_of_day'] ?>" /> </div> <input type="submit"
[jQuery] Confirmation alert fires multiple times with jQuery click
I add multiple items with each click and then I want to remove them one by one by clicking. All is ok, but if I add 2-3 items and the click the first one, confirmation alert fires multiple times when i click Cancel. The number of times depends on how many items goes after curent. Please help to fix that :) Code: ----------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;
[jQuery] cluetip jsonp and jquery doesn't play nice together
Hi, I wanted to use cluetip and jsonp with jquery (1.2.5, but apparently the issue is also present in jquery 1.3). I wanted to add a cluetip popup for a bunch of links like this: $("a[cluetip]").cluetip({'sticky': true, ajaxSettings: { dataType: 'jsonp'}, ....}); This works very well for the first link which is hovered, but fails to work with further links. The problem is jquery overrides the jsonp dataType with "script": // We need to make sure // that a JSONP style response is executed properly
[jQuery] flexbox question
I'm evaluating Flexbox for a project: http://www.fairwaytech.com/Technology/FlexBoxDemo.aspx In example #1 there I can type in some chars and items with those chars *inside* a result get highlighted (though only the first instance of the found chars in any given item gets highlighted). In all of the other demos the matching only occurs at the beginning of the items. Is it possible to have the *in the words* matching behavior happen (like in example #1), but also have the list filtering behavior that
addClass with attribute slow?
Welcom! I am a newbie in jquery. I was wondering if is it possible to addClass with some time attribute. I do not want to addClass imidiately, I want it to wait in time. I want to make an opacity in css but it must be very slowly. Can anybody help my. How to solve it?
[jQuery] How to reduce this code by chain them up?
Hello, I have a div ( id="rightheader") and inside there is a table. The following code replace all content of the table with empty space and then remove the table header. var $templateTable = $("div#rightheader").clone(); $("tbody > tr > td > div ", $templateTable).html(" "); $("thead",$templateTable).remove(); I feel it might be unnecessary, but I can't figure out how to chain up the statements. I tried var $templateTable = $("div#rightheader") .clone() .("tbody
[jQuery] jQuery/JS/canvas/PHP remotely *shared* whiteboard
A remotely shared white board, using regular JavaScript, jQuery, the canvas element and PHP. I hope I (or someone else) can get this thing working. The new 8:25 a.m. (US CST) version in http://mynichecomputing.org/roughDrawKit.zip should work -- though I still have not seen it work, perhaps due to a caching problem.
[jQuery] Media Plugin (Malsup)
First off this media plugin is awesome and has saved me a lot of time, thanks for all your work in developing this! Now to the issue. I am sure you have come across this before where you have 5-10 players on a page and you click the first player to listen and then about halfway through you click on another player to listen to a new song and boom your ears start exploding from the mashing of rhythms! Is there a way to only "enable" one player at a time, or some way to stop all the other players when
[jQuery] problem with closing all found divs
Hi, my source looks like this: <table width="100%" border="0" id="edit_categories"> <tr> <td colspan="3" align="right"><a href="/admin/index.php? action=categories&function=add&sub=add">Neu hinzufügen</a> <br /> <br /
Selector for <a> in nested divs
I am trying to select all <a> links in a div (id='mydiv') The div is nested in other divs I can select $('a') and my method works for all <a> in the document How can I select all <a> for just my div, if it is nested in other divs?
Next Page