[jQuery] How to mask and unmask
I'm using the mask plugin http://digitalbush.com/projects/masked-input-plugin/. In <head> : <script type="text/javascript"> jQuery(function($){ $("#MYINPUT").mask("99/99/9999", {placeholder:" "}); }); </script> this function control a combo box. $(document).ready(function() { $('#COMBO').change(function() { jQuery(function($){ $("#MYINPUT").unmask().mask("999.999.999-99", {placeholder:" "}); }); }); }); but is not working. anyone knows why?
[jQuery] Event handlers not receiving the right parameter?
Hi all - New member here. I'm just getting started with jQuery (after working with Prototype for a while), and I'm liking it so far. I've encountered a bit of a problem, though: jQuery doesn't seem to be passing the correct parameter (the event object) to my event handlers. I have a standard horizontal nav - an unordered list of links - for which I'd like to set up mouseover behaviors. Here's my JavaScript: $("#nav li").mouseover( function( evt ) { alert( evt.target ); } ); $("#nav-home").trigger(
[jQuery] custom events for non-dom elmts - possible with jQuery?
Hi all, Is it possible to use jQuery's event system to implement an observer pattern with non-dom objects? Or should I source for alternate solutions? I'm looking at doing something like this: //======================================= var event_source = {}; var listener1 = { onCustomEvent: function() { alert('listener1'); } }; var listener2 = { onCustomEvent: function() { alert('listener2'); } }; event_source.bind('onCustomEvent', listener1); event_source.bind('onCustomEvent',
[jQuery] custom events for non DOM objects - possible with jQuery?
Hi there, [resent from groups.google.com as the email from my client seems lost in cyberspace] Is it possible to use the jQuery event system to implement the observer pattern for non-DOM objects? That is creating a non-DOM event source object, onto which several functions or objects can attach themselves as listeners? I'm looking at something like the following: =========================== var event_source = {}; event_source.bind('onCustomEvent', function(){ ... }); event_source.bind('onCustomEvent',
[jQuery] after updating the html for a select list, the .change event no longer works
Is there something that I need to do after I empty a div that contains a select list with id 'test' and then post new html to that div for that select list that has the same id 'test'? It seems that after I change the html, the select list with that id is no longer working. In other words, this function doesn't work anymore: $('select#test').change(function() { ... }
[jQuery] Input array
HI I have a dynamically generated form with text and select field arrays using braces ( fieldname[] ). How to get values of these input field so that i values from all the fields. I don't know the total number of fields as it is dynamically added. Thanks
[jQuery] scrollLeft() while using jScrollHorizontalPane?
Hi everyone, I'm having a problem with a pretty simple piece of code: I have a overflowed div acting as an iframe, and am trying to use both the dimensions plugin and jScrollHorizontalPane with it: jQuery(function() { $('#view-content-shop-standard-view').jScrollHorizontalPane({}); $('#view-content-shop-standard-view').scrollLeft(75); alert( $('#view-content-shop-standard-view').scrollLeft() ); }); Here, neither calls to scrollLeft() do anything. On this page: http://threeformed.com/labs/jScrollHorizontalPane/examples/basicScroller.html
[jQuery] jQuery Plugin : autocomplete problem
Hi All, I am having a particular problem with the autocomplete plugin of jQuery. Although the autocomplete plugin does what it says. But in my situation, i am not able to make it work after ajax updates my form field. Here is a brief scenario of the problem. I have a form where some tags are saved with ajax and the field is updated with new tags. After the field is updated, the autocomplete doesn't open up. and I am not able to make it to work. Please if anybody can help me sort out this problem,
[jQuery] Accordion menu focus in onopenclose:function ?
I have forms inside accordion menus and want to focus on the first element (that has a tabindex) after the accordion opens. Accordion has a function for this, "onopenclose". If I put $ ("input[@tabindex]:first").focus(); in there, then when the first menu opens the first input field gets focus. But that is not what I want. I want a child the next sibling <ul> after the <h3> that has class "openheader" to get the focus. So I try this... $("h3.openheader + ul input[@tabindex]:first").focus(); and nothing
[jQuery] Conditional for IE6, or just IE?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=802063813-12082008><FONT face=Arial size=2>I have a line of jQuery which removes a background image from a container DIV:</FONT></SPAN></DIV> <DIV><SPAN class=802063813-12082008><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=802063813-12082008><FONT face=Arial
[jQuery] Send password with post
<div dir="ltr"><div>What I want: When click in a button, call a javascript function that: <ul><li>calls with post a function in my server (by a url) that gives a response</li><li>get this response (that is a password) and send via post to other address</li> </ul></div>I could send via post by a function php in my server, but I don't want this right now, it must step by a java script. thanks! </div>
[jQuery] Cycle Plugin - PagerEvent MouseOver
Thanks for this great plug-in. You can see how I'm using it here - http://www.cmfprefinish.com cmfprefinish.com I'm using the pager successfully however I'd like to change the cycle speed variable when the mouseover event is called. Normal transition speed is set to 600 but I would like to set speed to 1 when the mouse rolls over a pager button. The reason for this is that if the user rolls the pointer over the pager buttons quickly, the first pager item will have the mouseover event fired. In other
[jQuery] [treeview] Open a certain "folder" when page loads or link
So here is my problem... if anyone could help that would be great and thank you! in advance. Say this is my menu: Folder 1 (href="folder1.htm") - File 1 (..) - File 2 (..) - File 3 (..) Folder 2 (..) - File 1 (..) - File 2 (..) File 1 (..) I'm using the location.href which works perfectly when I click on File 1 (webpage).. and I have it bold "File 1" when it is on that page. When I click the "Folder 1" page, is there any way to have the "sub pages" show in the treeview? Example: Folder 1 (href="folder1.htm")
Close with delay
I have made a fairly simple toggle menu with the following code. jQuery.noConflict(); jQuery(document).ready(function() { // hides the slickbox as soon as the DOM is ready // (a little sooner than page load) jQuery('#statussettings').hide(); // toggles the slickbox on clicking the noted link jQuery('a#statusbarsettings').click(function() { jQuery('#statussettings').toggle(400); return false; }); }); However since it is menu like it needs to close when the user isn't using the menu anymore.
[jQuery] A simple gallery accessible with jQuery
A simple gallery accessible with jQuery. Explanations (Spanish). http://www.innovacionweb.com/galeria-accesible-jquery.php Demo. http://www.innovacionweb.com/galeria/ Source Code. http://code.google.com/p/galeria-jquery-jsgal/downloads/list Greetings. Innovacionweb.com
[jQuery] Two effects queue running simultaneously
Hi, I want to run to effect queues simulaneously, for example run some animations, while shake effect is running. Is there any way to do that with jQuery?
[jQuery] Architecture for google Gears.
Hi I'm doing some research implementing Google Gears. To work with Gears it is necessary to know if the web server is accessible. The solution I have seen so far, is to ping the server periodically, and to set a boolean var "isOnline" accordingly. Then when a request needs to be executed, the var is checked to know if the request goes to the webserver of to gears. I did not like this, because it is not robust. The server can fail just after having been pinged, and receive a request because "isOnline"
[jQuery] jQuery and Vimeo
I was just looking into the Vimeo api decided I wanted to implement some of their videos on my site. I have done the following and keep getting a parse error. Does anyone know what I am doing wrong? Thanks for the help. $(document).ready(function() { $.getJSON( "http://www.vimeo.com/api/oembed.json?url=http%3A// www.vimeo.com/1441383&jsoncallback=?", function(data) { $("body").append(data); } ); }); </script>
[jQuery] Problem with a jQuery script (drop-down)
Well i have this script for a drop-down menu. My problem is that the box starts already dropped down. I want so that it is "dropped in" (i mean simply gone) and when i click the link, the box drops down. Hope you understand me. :) It would be even nicer if it could work when i hover over it drops down and when i hover out of it drops back in. :) I know it's quite easy, but the fact is i am starting out with this and i am still learning, and i need this kind of script which partly i have found here
[jQuery] Why does one click event work and not the other?
Hi, I want to define a click event, so natrually this works $('#treeDelete').click(function() { ... } but I would like to get this to work (and I can't) to guarantee that only a single click event is defined for this id $ ('#treeDelete').unbind('click.clickTreeDelete').bind('click.clickTreeDelete', function() { ... } What is wrong with the above or is tehre a different approach I can take to guarantee only a single click event gets defined on the object? Thanks, - Dave
[jQuery] Effects optimisation
Hi everyone I'm trying to "fight the good fight" in my company to develop a website using jQuery rather than Flash. We only want a site with basic animations like fades and moving photos around, rather than full-on vector animation, which I confidently assured our Marketing and Designer people would be possible using jQuery! I've created a very basic prototype containing the type of effects we're going to need, and people are impressed but they are a little concerned with the performance of the animations.
[jQuery] Select Box Manipulation plugin - odd behavior?
Is anyone familiar with the Select Box Manipulation plugin? I'm seeing some 'odd' behavior and I wonder if anyone else has seen it. Basically, if I sort a select then use addOption to give new text to an existing option the wrong option gets the new text. (I have a link that I could share that shows the issue). One thing that is part of my issue is that I want to keep a certain option at the top of the list. To do that I am giving it new text before the sort (something like 'AAA'), sorting the list,
[jQuery] Problem using jQuery form plugin
Hi I found http://malsup.com/jquery/ which is a form plugin based on jQuery, maybe jQuery can do this by it self. Anyway I have a little problem, I want to load a form in a div when the page opens, thats no problem. but when i want to submit the form the page opens the action file instead of updating the current page. The way i want it to work: Load form when you open the website on the form you can type in username and then submit, response should be a new form where you can enter a message. i almost
[jQuery] Validate: radio buttons and required:true
Hi I'm using the validate plugin with the metadata plugin to validate my forms. For example, <input type="text" name="foo" class="{validate: {required:true}}" /> My question is quite a simple one, but I just can't figure it out. Basically, what do I do with radio buttons? Do all the radio buttons need a validate class?
[jQuery] jqModal and scrollbars
Hello folks, I've hit a block with my intro to jqModal and am seeking some help. I need scrollbars in the modal window. I am loading content into the modal window via AJAX and that content is "overflowing" out the bottom of my screen. I tried restricting the height of the window through jqModal's CSS in the hope that the scrollbars would then appear, and while that did fix the height of the window, my content still split outside of that window and off through the bottom of my screen with no scrollbars
[jQuery] Hello world help
Dear all, I am just about learning jquery and following the tutorials on the site. Heres the html. As per the instructions and my understanding, as soon as I click on the link, I should be receiving a pop up. However nothing comes and the link takes me to <a href="http://jquery.com">jquery.com</a> <html> <head> <script type="text/javascript" src="jquery-1[1].2.6.js"></script> <script type="text/javascript"> // Your code goes here $(document).ready(function(){ // Your code
[jQuery] [Validate plugin] Force default value into box?
Hi all, I'm using Jorn's validation plugin and I was wondering if it was possible to force a value into a box when it doesn't validate. For example, a box requiring digits could be set to 0 if the validator picks up an error (and the message still shown, the user can then change the value if they wish) Is this possible? Regards, Michael Price
[jQuery] [blockUI] blockUI and opera 9.51
hello, I have optimized my application that uses blockUI for IE, FF and Safari. Now I checked with Opera, and I got few problems. Namely, I got a blockUI based login page, where username and password is given, and a button is pressed. with opera, if user presses enter on the form, it will unblock automatically - skipping the login code. with IE and FF it will work ok. how can I disable this behaivor? (enter to unblock) or is there another solution? Best. -C.B.
[jQuery] SimpleModal confirmation box
I am trying to overwrite JavaScript confirm method with SimpleModal dialog. The problem is, I cannot call it outside of document.ready. If I just write confirm(parameters) all I get is a blank box without any text. How to fix this issue?
[jQuery] IE AJAX Refresh Problem with JQuery
Hello all . . . I have a litle problem with IE I have create a project that calculate the price of a series of services in my page by using AJAX based on JQuery. All are fie with all the common Browsers except the Internet Explorer ! ! ! The form cosnist of radio buttons to help the client to select what they want ! ! ! Any time the client selecting any radio button then an AJAX script colect all the form data send them via AJAX in a PHP Script that calculate the price and return back the total price.
each and pause
Hello I'm just wondering if it's possible to somehow add pause option to each function? Because right now I'm making simple slideshow where each function checkes the content of div and it shows all the images in it. But I can't pause each...
[jQuery] identifying an element with no "id" attribute
I've been struggling with how to identify an element which does not have an "id" attribute. here's an example: a page has, say, 5 links on it. of course, I can get a handle on an array of jquery object just by doing: $('a') and I can treat that as an array and loop over it, and can address particular elements easily, such as: $('a')[3].text() which will tell me the words being hyperlinked of the 4th anchor tag. But if the links don't also have "id" attributes, is there a way to tell WHICH element
[jQuery] how to highlight the selected word and let the server know its parentnode and position?
If a word is selected in the page, I want to : 1.highlight it 2.let the server recordes its parentnode and position in the node(such as it is the nth word in a ) . I think jQuery can do the 1st point easy, but can it do the 2nd point, and how? thanks!
[jQuery] Selecting the lowest nested element on click??
Hey, All. In the project I'm currently working on, I need to be able to select the lowest nested element clicked. I couldn't quite figure out how to phrase that, and it's still somewhat confusing how I did phrase it, so here's an example. Say, for instance, that a page has a structure like so: <div id="1"><div id="2"><div id="3">Some Text</div></div></div> Using the jQuery expression of $("div").click(function() { alert("You Clicked A Div!") }); you would receive 3 alerts when you clicked on "Some
[jQuery] supported key combinations
Is it possible to assign a function to execute when the key combination of z+i is pressed?
problem with fading div (again :)
Hi guys! I'm very new in JQuery. I've tried to combine sliding + fading... but I can't get it working properly and I'm stucked. Check it on http://www.drhorak.sk/ (these concerts) it works (almost) properly in Safari and Opera9 (i would prefer if the image stay dark even when I hover the tickets menu). Not in Camino (fading over all blocks at the same time). I haven't seen it in IE yet. slided But code is pretty messed: <script type="text/javascript"> $(document).ready(function(){ $(".catalog").hover(
[jQuery] small and maybe useful "else" extension
I sometimes have the need to select a group of elements, perform one action on one or more, and a different action on the rest of them, for example: $("div") .eq(1) .fadeTo(1000, 1) .end() .not(":eq(1)") .fadeTo(1000, 0); This is a trivial example, but sometimes the "eq(1)" is a more complicated selector which needs to be entered into both a filter() and a not() operation. As a shorthand, I wrote a small extension: jQuery.fn.else = function() { return this.end().not(this); }; $("div") .eq(1)
[jQuery] Unique List - conceptual walk through
Hello all, I'm pretty new to jQuery, but I'm really impressed with it so far. I'm just starting to get the power of returning the query object itself in order to chain manipulations. I'm trying to work through a problem and could use some input on what functionality I can use. Some of this question may cross over to UI but, I think it mostly falls in the core. I've got a list of names in some column. Some of the names are variants of each other. Like "John Adams" and "J. Adams". These names have
[jQuery] Unique List - conceptual walk through
Hello all, I'm pretty new to jQuery, but I'm really impressed with it so far. I'm just starting to get the power of returning the query object itself in order to chain manipulations. I'm trying to work through a problem and could use some input on what functionality I can use. Some of this question may cross over to UI but, I think it mostly falls in the core. I've got a list of names in some column. Some of the names are variants of each other. Like "John Adams" and "J. Adams". These names have
[jQuery] how to simulate a key press
hi, all how to simulate a key press such as 'tab'. thank you in advance! Jack
Next Page