[jQuery] if (! someThing.fired ) {
Is *fired* a valid property? If it is, how should you access it? There's nothing about it in the api, but I've seen it in some plugins. I'm hoping (desperately, by now) that it may hold the key to my painful non-working function problem ...
[jQuery] prepend - but make second item instead of first
I would like to add a row to a table. The first row is a header. So I want to add it just under the header row. How would I accomplish such an endeavor?
[jQuery] Selecting Parent
i have a table of linkedthumbnailed images like this... <a href="top_shelf.html" title="Top Shelf Cocktail Bar" rel="top_shelf.html" class="cluetip"><img src="images/beverages.jpg" width="150" /></a> i want to dynamically add a text description below each image using the "title" attribute from the image's parent link, so it looks like this... <a href="top_shelf.html" title="Top Shelf Cocktail Bar" rel="top_shelf.html" class="cluetip"><img src="images/beverages.jpg" width="150" /></a> here's my code...
[jQuery] Problem with namespacing plugins
Hi, I have a a problem that I don't really know how to take care of. I want to do something like this $.fn.myNamespace = { myVar : 'test' }; $.fn.myNamespace.myFunction = function(options) { return this.each(function(){ console.log(this) }); }; $('div').myNamespace.myFunction() But this aint chainable, which is my problem. Because what I really would like to do is to have a collection of plugins to the myNamespace object...like this $('div').myNamespace.myFunction1() $('div').myNamespace.myFunction2()
[jQuery] Unable to interact with page after fade
Hi, I've been trying to create a 'splash page' using jquery, and I've managed to code everything for it myself (meaning I've just looked through a ton of tutorials and examples). Basically I have a logo appear on screen, this then fades into the background and the content then fades in, the problem is you can't select anything on the page, or interact with it (as in links and flash etc.). Here is what I have so far: http://ov3rkill.com/temp/ty45k5e/ It does everything I want apart from letting me
[jQuery] result of 1.5b sortable("serialize"), into an array of id?
I'm not familiar with the format of the result of sortable("serialize"). See demo: http://dev.jquery.com/view/trunk/ui/demos/ui.sortable.html , click "Serialize!" How to convert it into an array of id? Thank you!
[jQuery] syntax question
hey mates, I didn't find an answer to my week-old question so i'll rephrase to simplify and focus on just the little bit of knowledge i need from you guys: say i want to create a function that performs some jquery methods on an element. function doThis(){ $(this).text('i've been changed'); alert("my uniq="+this.uniq); } now, inside a plugin, i want to use that function as an option value $('div.toBeSelected').myplugin({onIni:doThis}); here is my pseudo plugin: $.fn.myplugin= function(options,callback){
[jQuery] How to keep focus on input field after change?
I would like to keep the cursor in an input field after a change. I tried the following, but it doesn't work. The change even is activated, and "do stuff" works, but the focus does not go back to the input field. Does anyone have suggestions? $(function() { $(":input).change(function() { // Do stuff $(this).focus(); }); });
[jQuery] Jquery and function(json)
Hello, so today I started with jquery and wow :D I have one question regarding json. I found this topic (I'm sorry if linking isn't allowed) http://www.designerstalk.com/forums/programming/29651-jquery-ajax-question.html I want something similar: ... success: function(json){ if( json.success == "true" ) { } else { if(json.error == "1") { } .... but it's doesn't want to work with my script. Now is jquery.js (latest) enough or must I include special addons? Or this works and my php file isn't right;
[jQuery] Unable to get jQuery working properly in MSIE (6/7)
Hi, I have implemented jQuery on a site (http://www.good2b.nl) to automatically resize an iframe with a calendar in the right hand column. This works perfectly on Firefox and other browsers. MSIE just does not like me. If anyone is willing to have a peek and help me out, this would be appreciated. Scroll through the months to see in Firefox that is it resized, in MSIE, it stays like it is at first load. I am using the jquery iframe sizing script from http://sonspring.com/journal/jquery-iframe-sizing
[jQuery] [treeview] Branches with checkboxes
Hi Jörn The problem I've got is that I need to be able to have a checkbox on each branch/node, but clicking the checkbox of a branch in addition to toggling the checkbox expands/collapses the branch. Can you help? I can't see what's causing this. Thanks, J. PS, this structure is what I'll be using when I get tri-state stuff added. PPS I (fingers crossed) think this will get the attachment onto the group - sorry again about the earlier (direct) email.
[jQuery] creating modal layer on the fly?
I am trying to write my own little modal popup script and it's working fine in FF but not in IE7. In IE7 the modal layer shows up on top of the content I want displayed even though I believe I have the Z- Indexes set properly. Anyone run into this an know how to overcome it? I know there are other pre-written solutions out there but I wanted to create my own. Here is my code so far, I know it is rough - plan on cleaning it up once I get the functionality working: $(document).ready(function(){ setupPopup('linkSuggest');
[jQuery] controlling li-items with unique IDs and trigger corresponding DIVs
hi guys, hope someone can give me a hint for this. if i had an unordered list as shown below, where the li-items had unique IDs - is there any way that we check which li-items has been clicked so depending on that, we could show/animate a corresponding, unique DIV (each li-items would have its own corresponding DIV)? these DIVs would be preloaded and hidden via CSS somewhere on the page. <ul> <li id="link1">Lorem ipsum dolor</li> <li id="link2">Lorem ipsum dolor</li> <li id="link2">Lorem ipsum dolor</li>
[jQuery] hover + "animation" problem
I have two images operating as buttons with the hoverIntent event and I want to do a fadeOut -> src (image attribute) change -> and fadeIn with another three images at the same time. These two buttons are together and when I change from one to the other, images don't change or do wrong things. If I leave the button one to another page zone and then I put the mouse over the second button, it works properly. Do you know why? I was looking for a solution here but I only found things about hoverIntent
[jQuery] [validate] Validation AlphaNumeric?
Hey Jörn, I was wondering if you could add a method in the jquery validation plugin to restrict textboxes to only certain types of characters. For example: a name field cannot contain any numbers, so if it does, throw an error. Another example: last four digits of SS number: cannot contain characters, so if it does, throw an error. Thank you, Yuval Karmi
[jQuery] [validation] Validating a form with a radio and checkbox buttons - strange behavior
Hi! One of test from demos named "Validating a form with a radio and checkbox buttons" behave strange from my point of view. Checkboxes group Spam Spam via E-Mail Spam via Phone Spam via Mail show error message "Please select at least two types of spam.", if none or only one of checkboxes was checked before submit. This is correct. But this message disappear then I uncheck something. Looks like a bug. Serge
[jQuery] Quick way to package form elements?
Hi, What's the quickest way you know of to gather parameters and values in a form and put them into a string param1=value1¶m2=value2 ... and so on. Not sure if this affects the question, but I have radio buttons and checkboxes in my form. Thanks for any insights, - Dave
[jQuery] Re[jQuery] moving dynamically added elements
Hey all How can I when dynamically adding a new element also bind a click event to another element which removes it? //Here's what I have so far, redundant code is omitted $.fn.addElement = function(options) { //Redundant code omitted this.prepend($elementToAdd); //dynamically create a new DIV $removingElement.click(function() { $elementToAdd.remove(); }); } What happens is that jQuery somehow holds references to all of the added elements and in case of a $removingElement.click removes all of
[jQuery] Choosing an Autocompletion solution
I searched google for "jquery autocompletion" and was overwhelmed by the choices. Looks like people have been borrowing heavily back and forth to get the best solution. Has anyone gone through the choices recently and selected one? If so, which did you choose and why? I'd like to use it for both local and Ajax server data.
[jQuery] tabs: possible to save a form when switching tabs?
Hi, I'm using the jQuery tabs plugin from here http://docs.jquery.com/UI/Tabs. I have a number of AJAX tabs. When one of the tabs loads (the tab "Properties"), it loads with a form. How do I call my validate form function and then submit this form when a user clicks on a different tab? Here are the relevant parts of the code: <html> <head> <script type="text/javascript"> function validateForm(whichForm) { ... } $(function() { $('#tabcontent > ul').tabs(); }); </script> </head> <body> <div id="tabcontent">
[jQuery] searching for an element with particular value
Hi, How do I search the DIV, "myDiv" for a hidden input field whose name begins with the word "file" and whose value is equal to the value contained in the variable "myVar"? Thanks, - Dave
[jQuery] OT: TinyMCE help
I know this is OT but I couldn't find muchuseful on the TinyMCE home page and there doesn't seem to be a support forum at all. I'm building a CMS and am using jQuery and TinyMCE together for the user interface. I wanted to have an image picker, where you just pick an image from the list of images uploaded to the CMS and it gets inserted, but I can't figure out how to do it with any degree of sophistication. I managed to hack something with execCommand ('insertimage') together but it doesn't let you
[jQuery] Dynamic Variables
Hi, I hope someone can help me out a bit. I am finding myself doing a lot of code (as I'll paste below). It's basically the same block of code with different variables. What I am trying to do is consolidate all that code into a funciton where I can declare all the checkboxes I need to create an Click function for, and then loop through them and generate the click handler as well as other functions for all of them. Here is the code snippet: $('#ckbx_wgmpo').click( function() { if
[jQuery] Event handlers stacking using JQuery
Currently document ready call at different place can be stacked together and call at once. How about normal events, e.g. window.onload (i.e. runonload.js is quite handy in this area, http://safari.oreilly.com/0596101996/jscript5-CHP-17-SECT-6) Besides, event such as mouse clicks, can we stack event handlers together so they can be called one by one? Best Regards, Howard
[jQuery] Problem attaching click event to links
Hi, first, i'm sory this problem is probably solved in somewhere in the net, but i don't have much time. Mi problem is this: I have links that it's href is only the hash( href="#id=123"). i need to do that because i need a direct acces to some artcles, etc. But when i attach the event click to the links, and i click them, don't happens anything. The hash of the URL changes, but the event doesn't trigger. My code is this: HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
[jQuery] What's wrong with this conditional?
Hi. I'm still struggling with this! It's supposed to load an alternative stylesheet if images are OFF. I'm trying a zillion different methods, but they only seem to 'half' work :( Here's my latest attempt; I tried a ternary as a last resort ;) I don't get a code error, but still only the 'images on' part of the sequence works. // provide for users without images (($( '<img src="' + '/images/bgimage.jpg' + '#' + Math.random() + '"/
[jQuery] on form submission, how to decide "on submit: return true / false"
Hi there, I just stepped in the jQuery world, and my first homework is try to make a simple form validation example like following. The problem is I haven't figure out how to automatically decide, on form submission, how to figure out return turn or false. I want the submit & receiving happened in same page, for e.g. <register.php> by using <form TARGET="<?php echo "$PHP_SELF"; ?>" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[jQuery] FadeOut and IE 6
I'm attempting to write a new type of interactive widget and have run into a problem. This widget uses various backgrounds for the different states within it and when a user changes from one state to another, the requested interaction should be to fade out the existing background while the new one fades in. I've got this working great in Firefox, but, as always, IE is giving me fits. It seems to ignore the fadeOut function and just removes the element altogether before fading in the new. I'm sure
[jQuery] Code works in Safari ONLY
Hello everyone. I wrote a simple horizontal scrolling script (similar to http://www.panic.com/coda/ this ), but unfortunately it works only in Safari and I have no idea why.. :-(( Here is the code: $(function(){ var current_item = 1; var last_item = 4; var item_width = 300; $(".prev").click(function() { if( current_item == 1 ) scroll(last_item); else scroll(current_item-1); }); $(".next").click(function(){ if( current_item == last_item
[jQuery] animation question
I'm trying to create an effect using a <ul> within a <div>. I want to have each <li> slide up individually from (outside) the bottom of the <div> to the highest available position in the <div> without overlapping other <li> elements. Its kind of a "scroll/accordian" effect. At the conclusion of the animation, the <div> would look something like this: <div> <ul> --------------------------------------- | | | <li> | | | --------------------------------------- | | | <li> | | | ---------------------------------------
[jQuery] id of draggable <LI>
I have an unorderd list with many items, like this: <div class="itemContent"> <ul> <li class="9" id="2053">item 9</li> <li class="19" id="2044">item 19</li> </ul> </div> I want to make it possible to drag and drop an item to another DIV. For that, I used jquery UI with the droppable en draggable extensions. Everything works till now, except from the fact that I can't get the ID of the draggable list-item. $(ui.draggable.element).attr("id") doesn't work, it gives 'undefined'.
[jQuery] what editor do you use?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000066"> I changed my own a few weeks ago, now I'm using Editpad++ (<a class="moz-txt-link-freetext" href="http://sourceforge.net/projects/notepad-plus/">http://sourceforge.net/projects/notepad-plus/</a>) its freeware, nice resources, like macros, quick-text, highlighted source, ... and yours? <pre class="moz-signature" cols="72">-- Feijó </pre> </body> </html>
[jQuery] Opening a Shadowbox onload?
Does anyone know how to open a shadowbox onload, whithout having to click a link?
[jQuery] kill the cpu
can this code kill a cpu? $(function() { show_clock(); }); function showtime() { var meses = new Array("ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"); var dias = new Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO"); var d=new Date(); var seconds = d.getSeconds(); var minutes = d.getMinutes(); var hours = d.getHours(); var ampm = (hours >= 12) ? " PM" : " AM"; var week = dias[d.getDay()]; var mes = meses[d.getMonth()]; var dia = d.getDate();
[jQuery] $('#foo').ready(function() { ... });
In my current project Im finding my self to a lot of $(document).ready(function() { if($('#foo').size == 1) { ....... } }); Now im thinking of a way to extend jquery something like this: $.fn.cready = function(callback) { if($(this).size() == 1) { try { c = this; $(document).ready(function() { (callback || function(){}).apply(c); }); } catch(e) {} } return this; } but when i run $('#foo').cready(function() { ... }); the dom is obiviously not ready so $(this).size() == 0 Any suggestions on how i can
[jQuery] sending an array[] with $.ajax post
hi i've got an array made after a selection of checkboxes and i want to send this values to a php page to do some sql query. i couldn't manage to pass the values via post and this is my function var myFunction = function() { $("#cancellaRecord").click(function() { if (confirm("sei sicuro di voler cancellare questi record?")){ arrayCheckBox = new Array; arrayCheckBox = $("#selezionaCancella input:checked"); $.ajax({type: "POST", url:
.val problems
Hello Every one. I'm quite new to jQuery so as you'd expect I've run into a few problems. I have a form that has a drop down list at the top of it. When the drop down list is changed i t is supposed to send a post request to the next page which in turn recreates the form but fills it with the appropriate datat. I had it all working amost properly using the .text insted of f .val but this returned the value for all of the select items . So now I need some help. Below is a the jQuery bit and below
[jQuery] How do I remove/delete a function?
Maybe I'm missing something, but how would I remove a jQuery function after it's no longer in use? I'm using an ajax driven site, so the page never is reloaded, so do all the jQuery functions I define just stay there? Does this cause memory issues? Is there a way to remove it after it's not longer in use? Thanks!
[jQuery] Closing a ThickBox modal window.
If this is the wrong place to ask I apologize. I tried the jquery-plugins@googlegroups.com list but my email bounced back. I was told, and I also read that to close a modal TB window all I need to do is call the tb_remove() function. Well, I'm new to AJAX as well as JavaScript as a whole. How would I go about calling tb_remove() from my modal window? Thanks in advance! -- ~Steve
[jQuery] only text rule ??
Hi, I would like to have a "onlytext" rule, that is to say no special chars as" ' / ; : `$ etc... Or maybe im wrong and it is already done ?? Please excuse my english...................... Thanks and kiu :D
Next Page