[jQuery] keydown and blur() events - Problem on IE
The problem: this bug on IE is: if press enter key the test() function execute two x. keydown=true; // fake to enable blur on IE function test(){ // for test input values num=$('div span').length; $('div').append('<span>the '+num+'test for input values...</ span> '); } $(document).ready(function(){ // DOM $("input").bind("keydown", function(e){ // this a enter2tab function if (e.keyCode == 13) { // if ENTER keycode test() // exec function test input value keydown=false;
[jQuery] add/removeClass vs css
I'm a newbie in learning mode, and I am experimenting as part of that effort. I am writing a little menu code to that end. Anyway, as I "roll" over a submenu I want to visually change that item. I have done it using the css function and it works fine. However, when I try to do the same thing using add/removeClass, it seems to do nothing. What am I doing wrong? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>menu4.html</title>
[jQuery] Lavalamp menu with secondary links in dropdown ?
Hi there, I've got a lavalamp 1.2 menu on my website. I've got a 2-tiered navigation, and would like to list all the 1st level links with my lavalamp menu, and then when hovering over one that has child-links, would like to appear as a drop down menu (normal CSS dropdown would do). But then the lavalamp hover works that the moment you leave the link, the "bubble" moves away toward the current active link. Can anyone help me have it work like this: When you hover over a link with children, they appear
[jQuery] Data binding with jQuery. Is it possible?
<!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><FONT face=Arial size=2><SPAN class=168251813-31072008>So I dabble in Flex which supports binding a structure, or array to some page element such as a drop down list, or form field, or anything really. JQuery clearly supports binding, by allowing methods to be bound to elements on
[jQuery] Show/Hide Sibling
Hi, I have written a quick form validation script that checks if form fields are empty, and if so, returns a visual cue (through an error message) that the field is required: $('.error').hide(); $(".submit").click(function() { var name = $("input#name").val(); if (name == "") { $("label#name_error").show(); $("input#name").focus(); } var email = $("input#email").val(); if
[jQuery] textarea max. 250Chars
Hello I need a textarea where you can type in max. 250 Chars. Would be good, if you see the remaining chars on the lower right. I have no idea where to start. Can someone give me an "uplift"? ;-) A hint in the right direction? thx tl
[jQuery] jQuery attr method and getAttributeNode
jQuery's attr method returns something I wasn't expecting in IE. I think I may have found a bug, but I may be misunderstanding something. Here's the (very short) HTML source example demonstrating my "bug": <html> <head></head> <body> <form> <fieldset> <legend>Change Your Language</legend> <button value="testValue" name="testName" type="submit" class="accessAid"> <img border="0" alt="" src="test.gif"/> </button> </form> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript">
[jQuery] Keyboard navigation idea
Hello, I'm struggling with one problem for quite some time and I can't find the proper solution. On my personal page ( http://www.tomislavdekovic.iz.hr/ ) I have jQuery powered navigation menu and it's completely unobtrusively coded, but I want to create some kind of keyboard navigation. Mouse hovering is good, but I would really like to give people optional keyboard navigation (you know the drill, TAB-TAB-TAB-ENTER geek stuff ;-) No matter how much I think about it, I can't think of a good starting
[jQuery] JQuery Ajax problem with only some internet explorers...
<html> <head> <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" /> <script language="JavaScript" type="text/javascript" src="http:// www.sporti.dk/lib/script/jquery-1_2_6.js"></script> <script type="text/javascript"> function testA(){ phpurl = "http://www.sporti.dk/ajax/postcode.php? country=DEN&postcode=2100"; $.ajax({ url : phpurl, success : function(city){ alert( city ); $("#text1").html(city); $("input[name='input1']").val(city); if (city.length >= 1) { alert( city.length
[jQuery] jCarousel and Safari.
Hi, in the changelog of the latest version of jCarousel one lines reads: "Fixed (hopefully) issues with Safari.". Since I can't find a online repository of the code, I can't see exactly what the fix really did. But my guess is the lines 188 to 192: if ($.browser.safari) { this.buttons(false, false); $(window).bind('load', function() { self.setup(); }); } else this.setup(); This solution requires the jcarousel to be loaded at parsingtime or domready. In my app I have a getJSON-request, to fetch the
[jQuery] getJSON calls are not performed in Internet Explorer
Hello, i have just finished a project and jQuery greatly simplified the development process. However the website doesn't perform as it's supposed to in Internet Explorer, although it works perfectly in Firefox and Safari. What the relevant code does is, on document load it fires a getJSON request to get 25 objects which are then appended to a div with an id "browse". This unfortunately does not happen in IE. Here is a link of my site, any comment would be appreciated. http://dubstage.ath.cx http://dubstage.ath.cx/media/js/dubstage_main.js
[jQuery] iPhone type Cropper
I am attempting to create a cropper for my web app but I'm having some troubles. I want the cropper to kind of be like the iPhones image cropper where you drag the photo around inside of a box and you can resize it. I have the drag part implemented but my problem is how to keep the photo covering the whole box. has anyone done something similar to this or have any suggestions on how to go about it? Thank you.
[jQuery] Closing a Cluetip when a link in the content is clicked
I'm new to jquery so if the solution to my problem might be quite obvious to some, but it's not to me. I'm populating a cluetip with a list. Once an item in the list is clicked, it changes the content of another area of the page, optimally the cluetip will now close. This is where I run into problems. I've gotten everything working, but I can't get the cluetip to close when an item in the list is clicked. Can anyone give me a "remedial" lesson on the best way to do this? I found this post through
[jQuery] Assistance with code efficiency and speed
Hello everyone, I'm new to jQuery and have learned a lot from this list. I'm posting a code segment below that reads an HTML table and appends a link to a form if a table cell contains the word 'Offsite'. On some pages this will require appending up to 300 links, so load time has become an issue. I picked up the setTimeout trick from this list and it's working well but I would like to add performance and trim code as much as possible. Are there any obvious things I'm doing inefficiently below? I'm
[jQuery] autocomplete
how can I debug the code of autocomplete I'm using the firebug extension thanks
[jQuery] Jquery Help! Image disappears in IE6 and looks huge in IE7
this is my first post but i have been a secret reader of this forum for a while so thanks for all the help. http://www.shakeupmedia.com/NTVHTML2/ntv2.html i have cobbled together with the help of a young coder an image rotater with some flash like effects (ability to close the overlay being the coolest). i have managed to get it to work on firefox. but: on IE6, the image shows up as a black box. but: on IE7, the image sometimes get blown way out of proportion. just wondering if this is something
[jQuery] Weird slow page loading issue
Hello, I am linking to the jQuery core and plugins in the head section of my pages. Each page takes at least 3 seconds to load even though the pages are very small. It kinda seems like the browser isn't caching the js files, so each page has to re-download them. I checked all the browser settings and everything seems fine, so I have no idea what the issue is. Tested on IE7 and FF3 with same results. Just as a test, instead of linking to the core file, I copied the source and pasted it into the pages,
[jQuery] $.ajax() problem with only some Internet Explorers...
Hello, I have a problem with some customers that use Internet Explorer 7 and my ajax call. And it is ONLY a few who report this problem. My self included don't have any problems on IE 6 and 7, Safari, FireFox 2 and 3. But still some customers have problems with IE 7. The problem it self is that nothing inside the ajax() is executed. The "alert(city)" is not executed. IE seems not to throw any errors, the result is just not shown.... What am I doing wrong?? Here is the code that could also be found
[jQuery] jScrollPane with jQuery 1.2.6
does jScrollPane work with jQuery 1.2.6 It's been acting weird ever since I upgraded it today, my previous version 1.2.1 of jQuery
[jQuery] cluetip problem with numbered ID
Hello friends of jQuery, I have a small problem with numbered IDs in combination with cluetip: <script type="text/javascript"> $('#clickme100').cluetip({activation: 'click', width: 400}); </script> <a id="clickme100" href="mrnDetails.html" rel="mrnDetails.html? tMId=100" title="TruckManifest RSIFRA FRAATT18D"> <img src="images/aes_gestellt.png" alt="tool" width="14" height="14"/
[jQuery] blockUI timer?
I'd like to block some elements using blockUI when ajax is executed, but only if the request takes longer than one second. What's the best way to do this? Here's my fairly trivial code so far. var activeElem = null; $().ajaxStart( function() { if (activeElem) { $(activeElem).block(); } } ).ajaxStop( function() { if (activeElem) { $(activeElem).unblock(); activeElem=
[jQuery] Effects with Liquid (Variable Width) Tables
Hi, Trying to find examples of sliding and drag and drop effects for tables of liquid (100% or variable width) has been a fruitless endeavor. Does anyone have any examples, references or experience in applying sliding or drag and drop effects in these cases? Thanks!
[jQuery] HTTP Authorization
Hi, I am trying to use $.getJSON to get a JSON feed but I am failing on an authorization part and I keep getting a uername and password box when running the page. I have tried creating an authorize object and then passing this as data in the second argument of the getJSON method like this: var authInfo = "myusername:myPassword"; var authInfoBaseEncoded = btoa(authInfo); var myAuthObj = { Authorisaztion:authInfoBaseEncoded } $.getJSON("urlhere", myAuthObj, function() { //do something fun here });
[jQuery] looking for cmotion gallery for jquery
hello i like the hover scrolling effect on this plugin : http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm but im not able to find the same carrousel/slideshow plugin made with jquery. is there one somewhere, or can someone help me to modify the jcarrousel to do the same effect ?
[jQuery] $.post problem. need help badly
hi, i wanna try to save the data from a form to a database before submitting it to it's rightful "action" url. this is an opt-in form i wanna work on. i did this: $("form:last").bind("submit", submit_optin); /* i altered the submit event of the opt-in form so it uses the submit_optin function i created */ here's the submit_optin function: var submit_optin = function(){ var pbform = {name:"opt-in name", email: "opt-in email"}; // this is jus a sample data to be saved. $.post("http://www.myurl.com/save_data",
[jQuery] clone all css to another tag
Hi, I looking for a way to clone all css of a tag to another tag create with jquery any idea ? thanks -- View this message in context: http://www.nabble.com/clone-all-css-to-another-tag-tp18732301s27240p18732301.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
That old chestnut: FadeOut, load, FadeIn
Hello there, having some problems with jquery (1.2.6 production) - I've run through all the tutorials and so on, been playing about with it for a while and always had good results. What I'm trying to achieve here isn't that esoteric, I did a search for the problem and other people have also had trouble although because of different reasons - any answers I've found haven't solved my problem. Here we go. I have a nav (unordered list), each list item has it's name attribute matching a file in the directory.
[jQuery] $('a').click ... How to bind it again?
Hello jQuery world! I work with this lib since about 6 month, bought the book "Manning jQuery in Action" and I was very happy to give a "donation" to John for his great work... He really change my life, we can now build RIA in less-less and less time... Thanks to John and his team, bravo! Here is a quick and easy question for the gurus out there… $('a').click( function() { theLink = $(this).attr('href') + ' #mycontent'; $('#mycontent').load(theLink); return false }) As you
[jQuery] Help with Autocomplete - hopefully an easy one
Hello folks, I'm just looking at the jQuery Autocomplete plugin (http:// docs.jquery.com/Plugins/Autocomplete), and it looks pretty good for what I need to do. In the demo (http://jquery.bassistance.de/ autocomplete/demo/), the second input is pretty much what I'm looking for - where a user can hit the down-key and view a list of possible options without having to first type a search term. What I would like to know is how to trigger that dropdown remotely (e.g., by clicking a down-arrow button -
[jQuery] Pixel distance
<div dir="ltr">I'm trying to find out the x position of a 'td' based on its distance from the edge of the body The site is <a href="http://team.theroboticsuniverse.com/index.php">http://team.theroboticsuniverse.com/index.php</a> and I need to know the different between any of those 'td's at the top and the left side of 'body' (document)<br clear="all"> -- Regards, Andrew Horsman <a href="http://theroboticsuniverse.com">http://theroboticsuniverse.com</a> </div>
[jQuery] lightbox with jquery
sorry for posting two times, but my first entry did not show up. hello, i have build a lightbox plugin one my own with the help of dimScreen. now i have a question. how can i manage the event when somebody clicks outside of the popup div to hide it again. $("#exit").click(function () { $.dimScreenStop(); $('#warenkorbFenster').hide(); }); in this little code snippet you can see how i hide the fadeIn div after clicking on the exit button, but i want to hide it after clicking outside of the
[jQuery] Drag and Drop and Special Events
I finally got around to publishing some plugins... http://plugins.jquery.com/project/drag http://plugins.jquery.com/project/drop http://plugins.jquery.com/project/hover http://plugins.jquery.com/project/wheel All four plugins are developed using the special events api... I would love any feedback.
[jQuery] external jQuery calls
Forgive me if this is a silly question, but is it possible to call an external .js file that contains jQuery code? For instance, instead of writing something like this: <script type="text/javascript"> $(function(){ $("#myid").load("myfile.html"); }); </script> I would like to do something like this: <script type="text/javascript" src="/jquery_scripts.js"></script> I have tried without success. Any help (even ridicule for not grasping the basics of jQuery) is appreciated.
[jQuery] How about to add the sort function to jquery?
There are a few function in jquery to manipulate the array, e.g. $.map, $.merge, $.unique and $.grep and so on. So I think it is very necessary to add more useful function to it, especially the SORT function. like: $.sort(aArray), or $.sort(aArray, comparator).
[jQuery] tablesorter alphabetical/numeric hybrid
I have a column that sometimes contains last names and sometimes numbers, e.g. 1 2 .. Smith Wesson initial loading is fine and goes: =========================== 1 10 11 2 .. Anderson Morpheus Trinity but reversing it yields a weird result: ============================ Anderson Morpheus Trinity ... 1 2 3 .. I would think the reverse sort would just, well, reverse it exactly? jquery version is 1.2.1 don't know about the tablesorter version
[jQuery] jcarousel and load
I am using jcarousel for a gallery of thumbnails when one is clicked I want the content in a main div to be loaded based off of the thumb that is clicked. The following is the js for the html from jcarousel: function mycarousel_getItemHTML(url) { return '<a href="#" class="img_click"><img src="' + url + '" width="200" height="125" alt="" /></a>'; }; The images appear, but when I add this to my jquery nothing works on click: $(".img_click").click(function () { $("#maincontent-html").load("index-image-load.php",{thumbindex:1}
[jQuery] ajax help
Hi.... I really have no clue how to get this done.... I have a form with a few textboxes and a select box as well.... I want to have the form fill itself if you happen to select one of the options of the select box.... the data is at a mysql database.... I know this is probably fairly complicated so you dont need to explain it step by step, I would just appreciate a link to an example of this being done.... thanks in advance Just in case you want more backgorund info.... I have name, last name, ID,
[jQuery] Using jQuery to access the JSON that ColdFusion8 returns?
I'm using jQuery to make a direct call to a ColdFusion 8 CFC, with the optional returnFormat parameter. Here's the get call: -------------------- $.get("coupons.cfc?method=getSingleCoupon", { couponid: couponid, siteid: siteid, returnFormat:'JSON' },function(d){ // alert(d['DATA'][0][0]); console.log(d); $container.css({ 'background-image': 'none' }); }); Here's the result when I log to the console: ------------------ { "COLUMNS":["ID","TITLE"], "DATA":[
[jQuery] reference to undefined property opt.queue
I'm writing a script to deal with problems that occur when another site which mine gets data off is down. With just php - get_file_contents('http://other.site') - the page ends in an error message if the site is down. I'm using jQuery to remedy this, by having a placeholder on the site, and getting the data with jQuery.get('http://other.site',function(data)) and inserting the data where it's needed into the DOM. However nothing is working (I've peppered my script with alerts to try and see whats
[jQuery] multiple not() selection filters
I need to check for an element that is not disabled and not readonly, but the not() filter does not seem to handle multiple selectors. Any help with the syntax here? $('textarea[id]:not(:disabled, :readonly)') Thanks!
Next Page