[jQuery] Loading images using .load() - can't access img height?
Hi, I'm loading an HTML img tag into a div via the .load() function. What I would like to do is animate the container div to the height of the new image. The script I have works OK sometimes but on seemingly random occasions the code cannot access the height of the image - it returns 0 or 18. The code is below. The loadImage() function is called whenever a thumb is clicked on. My aim is to get the height of the new image and then fade it in when it has been loaded. $(document).ready(function() {
[jQuery] User types freely on webpage and it jumps to a link...
Not sure this is the right group for this question, I'm looking for a bit of JavaScript functionality for a site... I have a huge html page with a big list of links and want the user to be able to type the beginning of the word of the link (not in a box just freely type) and it jumps to that link... I want it to work like the phonebook in a mobile phone where you complete more and more of the name and it moves down the list accordingly. Expecting to be using JavaScript on it's own or Ajax, not really
[jQuery] When Loading external HTML Content, the embedded JavaScript doesn´t work
Hi everyone, I´d like to load an external html containing the jquery-accordion menu, the menu itself works fine $(document).ready(function(){ $("div#html").load("menu.htm"); return false; }); <fieldset> <legend>Loaded from an HTML File</legend> <div id="html"></div> </fieldset> The problem is, the javascript files cannot be loaded, in contrast to the css file which works. I already tried to include the javascript files in the main page, also found nothing suitable on the web and this
[jQuery] get colored list-items while hovering?
hello folks, sorry, i'm very new to jquery and i'm trying to run a pretty simple test, but it doesn't work :-/ could anybody give me a hint what's wrong? i want my li-itmes get colored grren while hovering, the alert-window after clicking a link works fine. thanx in advance! ---- <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { // get a-Tags from DOM and do click-event $("a").click(function() {
[jQuery] jQuery on IE8...
I love to learn how jQuery works so I decided to come up with a page to test some stuff. the URL is http://www.plumjava.com/YouTube/joshuabell/ Basically, clicking on the music titles will slide up the previous video and slide down the current video. It works fine in Firefox, Safari, Google Chrome but not in IE8. If I switch to IE7 compatibility mode, the desired functionality works. Can anyone look at the site and tell me where I'm doing it wrong in the jQuery script? Thank you very much.
[jQuery] status of jquery based wys/wym editors
Hi folks, I'm trying to evaluate various options for adding a rich text editor. I want to hack on it a bit, so I would rather something less featured and fully jquery based, *iff* the jquery based ones are up to snuff now for small scale commercial projects and decent cross browser support. I browsed some threads in the archive, but most were kind of old. If anyone cares to comment on the quality, development status, and future proofing of various jquery options, I'd love to hear it. Or misc success/horror
[jQuery] Possible to suspend click events?
Hi, Is there a way to disable a click event for an element and then re- enable it later, without having to redefine it later? I ask because I would like to generically disable events for elements of a particular class, and each different element has its own click behavior. Thanks, - Dave
[jQuery] Getting a fragment of ajax html and writing to the page
Hi, can anyone tell me how I can get part of a web page downloaded with $.get()? I thought it would be easy but ohhh no :( Here's a snippet: $("a[@class=popme]").click(function() { $.get($(this).attr("href"), function(popUpData) { var popupContent = $(????); $.modal(popupContent ); }); return false; }); At '????', I basically want to find the contents of a div in popUpData with an ID of foo as a string I can pass to a modal pop-up. The web page fetched is HTML 4.01
[jQuery] Empty string as selector returns an object
Hi I was a bit surprised to find that $("") has size one. Firebug tells me that the object's node name is "#document". Is this expected behaviour? Thanks Paul <html> <head> <title>selectors</title> <script type="text/javascript" src="http://code.jquery.com/ jquery.js"></script> <script type="text/javascript"> $(document).ready(function () { $("").each(function () { console.dir(this); }); }); </script> </head> <body></body> </html>
jQuery Hide stops working
I have a few divs that need to be hidden unless a check box is checked. Hiding them is no problem. This code does result in them being hidden: $(document).ready(function() { $('div.dd').hide(); $('div.gar').hide(); }); but as soon as I add anything below the hide , the divs are no longer hidden. Here is the code I'm adding: $('#dd_yes').click(function(){ if($(this).is(":checked") ){ $('div.dd').show(); } else{ $('div.dd).hide(); } } #dd_yes is the id for the checkbox that should be checked to make
[jQuery] Clash between jQuery UI datepicker 1.5.2 and an ASP.net 3.5 CustomValidator
Hello everyone, I'm experiencing a clash between jQuery UI datepicker 1.5.2 and an ASP.net 3.5 CustomValidator. The problem occurs in Internet Explorer 7.0, not in Firefox 2.0. When I change the date using the little drop down calendar, IE throws the following error: Line 172 'length' has a null value or is not an object I did a bit of debugging in both IE and Firefox. Now, in ui.datepicker.js on line 730, the change event is automatically triggered once the user selects a day: else if (inst.input)
[jQuery] Simple checkbox function not working
I'm trying to use the val( val ) method to check checkboxes but nothing happens. I've checked that the names of i and the value of the input field are identical. Am I doing something wrong? for (var i in p) { $(":input[id=" + i + "]").each( function () { if ($(this).attr("type") == "checkbox" && p[i] == "True") { $(this).val(i); alert($(this).attr("value") + ":" + i); } else { $(this).val(p[i]); } }); $("body").append(i + ": " + p[i] + "<br />"); } The alert shows: "grad_umcscu:grad_umcscu" All the
[jQuery] Fade in with transparent background....
Hey there, I'm trying to get a white half transparent background to fade-in by changing the opacity when the document finished loading. This works fine in Firefox, but in IE it first goes to 100% white and then suddenly changes to half transparent. It would be nice if it IE would behave the same way as Firefox does. Does any know how to get this right in IE as well, or should I forget about getting this to work in IE? http://tijmensmit.com/dev/fade2.html Regards, Tijmen
[jQuery] Why does this If/Else statement fail?
Hello, I have a pretty straightforward question. This is simple code; but still I can't figure out why its not working. This block of code works fine; its toggles a button graphic on mouse hover: var subscribeState = "off"; $('#subscribe').hover(function() { $(this).attr("src", "images/btn_Subscribe_over.gif"); }, function() { $(this).attr("src", "images/videos_subscribe_btn.jpg"); }); I want to add an if statement to it, so that it only swaps the graphic if the "subscribeState" var is set to "off"
jQuery animated picture
Hi, well I could need some help again. We got some kind of slideshow on a website and the picture's are 'cause of the 100% width really big. it's jerking and it takes a lot of cpu. I wonder if there is a way to use not so much cpu while the animation is running. Here's the code if it's needed. $(document).ready(function(){ $("#slideshow img").css("display","none"); function run(elementnumber){ if (elementnumber == $("#slideshow img").length) elementnumber = 0;
[jQuery] JQuery Plugin ajaxContent questions
Hi all, I'm using the ajaxContent plugin, it's loaded via a ColdFusion template (header.cfm) I'm running into a couple of issues with it.. 1) It positively will not load pages into a div in IE7 (works on one page in Firefox) 2) I'm running it on multiple pages, however it will not work on one page while working on another, the code is identical with the exception of the called page. and ideas on what's going on? header js calls are here: http://cfm.pastebin.com/m4d7f1d6 working ColdFusion template
[jQuery] select.append() works in FF 2 not in IE 7
I want to populate a select. This works perfectly in Firefox 2 but not in IE 7: var sel_modelo = $('select#modelo_id'); sel_modelo.empty(); for (var i = 0; i < json.rs_modelo.length; i++) sel_modelo.append(new Option('text', 'value')); Any hints? Regards, Clodoaldo
[jQuery] Help with "if/else" statement
Hello. I can't quite figure out why the "cmtStatus" value is always "closed" var cmtStatus = "Closed"; // toggle comment link $("#postCmtBot").click(function() { if (cmtStatus = "Open") { $("#postCmtBot").html("Hide Post Comment"); cmtStatus = "Closed"; } else { $("#postCmtBot").html("Post Your Comment"); cmtStatus = "Open"; } return false; }); I expect that it would toggle back and forth between "Open" and "Closed". Any idea what I'm doing wrong? Thanks, --shawn
[jQuery] jquery validation "min" rule
Hi, I would like to know how to use the "min value" rule for a select box. I have to use it adding the rule to the class in the html markup, not in the validate() method due to I generate the name of the select dinamically. I've tried this: <select name="myselect_Idnumber" class="min(1)" > <select name="myselect_Idnumber" class="min: 1" > but doesn't work. Any idea?
[jQuery] jQuery Cycle IE6 opacity issue
Hi, I am using jQuery - Cycle to swap Pictures and text on a home page http://www.onthebit.com.au/ (main pic, middle top) The text is in a div with a background color on top of the pic, so it needs to be semi-transparent it works fine in Firefox, but only the 1st pic/text is ok in IE6, once it cucles (fade) the opacity is gone! anyone has seen this before, is this a problem on my code, IE6 or even jQuery? thanks
[jQuery] Trying to create a dynamic TOC nested list
Hey fellow jQuery fans, i am trying to pull all headings out of a page and create a unordered list in the sidebar, which should then act as navigation help. $(document).ready(function() { $('#sidebar #references').after("<ul class='subnav'>"); $('.main h3.caps a').each(function(i, val) { $('ul.subnav').append(this.firstChild); }); }); I am able to append the pure text of the anchors, but i can't create the list. I was looking at the wrap-function of jquery, but didn't figure out
[jQuery] jScrollPane question
Hi. I found jScrollPane (http://www.kelvinluck.com/assets/jquery/ jScrollPane/jScrollPane.html) to create some vertical scrollbars like this http://www.kelvinluck.com/assets/jquery/jScrollPane/basic.html. I like this, but this is not really what I want. I need to create a flashnews vertical scrollbox which I can "drag & scroll" with my mouse, something like if the scrollbar is the entire box. How I can adapt the example to do what I need? Could you help me please? Thank you very much for your help!
[jQuery] Superfish "Current" menu not displaying...
I've got a few problems with Superfish v1.4.8 which I haven't been able to resolve. I am trying to implement the nav-bar style, just for the sake of reference. The largest one of all is that I can't seem to get the current sub menu to display when the page is loaded. The sub menu row doesn't display at all until I mousover the parent which is "current". Under Win/IE the menu displays for a brief second on load before disappearing. Under Mac FF/Safari the menu doesn't display at all. In both cases
Bouncing Accordion!
I have a small problem, I have a menu, tab style going across the top of my content. What I want is, using the jQuery accordion effect, to have each tab slide up to reveal a picture. At the moment everything is positioned perfectly, the tabs slide up when you hover over them but instead of staying up whilst hovering over them they kind of bounce and do funny things. It would be great if they would stay up onMouseOver and go down onMouseOut. This is a link to a *working* example on the internet http://udwebdesign.co.uk/index2.html
[jQuery] select.append() works in FF2 not in IE 7
I want to populate a select. This works perfectly in Firefox 2 but not in IE 7: var sel_modelo = $('select#modelo_id'); sel_modelo.empty(); for (var i = 0; i < json.rs_modelo.length; i++) sel_modelo.append(new Option('text', 'value')); Any hints?
[jQuery] IE issues accessing frames
i have a frame with a name and id of 'recordframe' with a div with an id of 'content-text' and which i can access as $('#content-text', frames['recordframe'].document) or $('#content-text', top.recordframe.document) then i have a link which i prepend to recordframe's context-text div which i can do as var recordLink = $('<a class='record'></a>') $('#content-text', frames['recordframe'].document).prepend(recordLink) or $('#content-text', top.recordframe.document).prepend(recordLink) but this functions
post variables and email not being sent
I can't seem to figure out why this code isn't working, I am trying to send variables from a contact form to a php file by using the $.post method. Here is the code, I apologize, it may be sloppy, first time using jquery. //define variables var arr = new Array($("[name=name]").val(),$("[name=email]").val(),$("[name=message]").val(),$("[name=human]").val()); var humanresponse = $("[name=nothuman']").val(); //send variables $.post("../send_email.php", { name: arr[0], email: arr[1], message: arr[2],
[jQuery] Hopefully simple jqmodal question (submitting a form)
I'm just getting started with jquery and jqmodal. I've built a simple div which contains a form. I'm able to use jqmodal to show this form without a problem. But the submit button no longer does anything---no matter what I do, clicking the submit button won't process my form. I'd like it to act just like it would if it was straight html. Is this expected? How do I make my submit button actually process my form.
[jQuery] jCarousel
http://www.axismediadetroit.com the app works beautifully in firefox... but ie7 the images won't load and links are unavailable i'm using jcarousel from http://sorgalla.com/jcarousel/ any suggestions for a fix or a replacement?
[jQuery] jQuery UI: Datepicker: Want to be able to type arbitrary text...
Hi, I'm trying to use the UI Datepicker object as a convenience for my users, but I don't want to force them to use it. When the form is submitted, I'm processing the date input field through PHP's strtotime() function so that my users can type in "two weeks ago" as a date. Datepicker restricts the characters that you can type into the input field to just digits and "/" so you can no longer type arbitrary text. I couldn't find a way to disable this "feature" via the options object. Am I missing something,
[jQuery] Omniture tracking code clashing with jquery
Hi everyone, Iam still a newbie in jquery but also quite successful in my attempts customizing plug-ins available on the internet. www.vectordot.com Recently I am applying the better coda-slider plug-in in one of my projects that also have Omniture tracking codes. The script jumps to the right pages, but it wont slide at all. Any of you guys encountered this strange occurence? I think it has something to do with the links, coz omniture tracking codes also utilizes it? M not so sure, being a newbie,
[jQuery] [treeview] making long names display in a single line
Hi Jorn and users of treeview, In my treeview implementation I need to restrict the width of the object. It's possible that some of the the tree node names will be quite long. Currently when this happens the node name is wrapped into 2 or more lines. I tried to adjust the css to force it into a single line instead: .filetree span.folder, .filetree span.file { white-space: nowrap; } This works beautifully in FF. In IE6 the name is also not wrapped, but IE6 will create a blank line before the name.
[jQuery] IE7 HTML(val) fails
Nav_SetTitle: function(inTitle){ $('#pageTitle').html(inTitle); }, This function works in FFox and Safari 3 - IE7 says object "does not support proprty or method". This is part of a custom plugin for 1.2.6.min. I have verified the following: - One, and only one, element exists with the name "pageTitle" - Plugin is working correctly. This function is actually called as part of an AJAX "success" routine - main routine works as expected - Calling the function body directly as $ ('#pageTitle').html('mytitle');
Help with if statement
Why doesn't this embedded if statement work? var subscribeState = "off"; /*hover*/$('#subscribe').hover(function() { if(subscribeState == "off") { $(this).attr("src", "images/btn_Subscribe_over.gif"); alert(subscribeState); }, function() { $(this).attr("src", "images/videos_subscribe_btn.jpg"); alert(subscribeState); } }); but this does work: var subscribeState = "off"; /*hover*/$('#subscribe').hover(function() { $(this).attr("src", "images/btn_Subscribe_over.gif");
[jQuery] jCarousel - Height Issue
I using jCarousel and for some reason I can not seem to stop the carousel from sliding down past the last image. Can anyone tell me how to fix this? I have put up a demo: http://www.dvq.co.nz/gallery/
[jQuery] error in jQuery?!
Hi guys, I have a question. I'm using jquery on my pages and js files are linked like this: <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="http://dev.jquery.com/view/tags/ui/latest/ui/ui.datepicker.js"></script> Everything works fine, but ff 3.0.1. is showing some(2) errors in mootools.js: el.set is not a function el=$(el);return(!props||!el)?el:el.set(p...mentById(el);type=(el)?'element':false;} ($(filter) || document).getElementsBySelector is not a function return
Chnage MySQL DB with AJAX.
Hello jQuery Pros! I want to update a mysql db with jQuery and AJAX. There is a star next to a username indicating that he's a favorite user and a grey star says he's not. I want to change the status (is favorite/is not favorite) quickly without reloading the page. But I have not done this before and I am quite new to JS and AJAX. Here is what I have: JS: // Make Favorite $('.makeFavorite').click(function() { $.ajax({ type: "POST", url: "make_favorite.php", data: "id=19",
[jQuery] ajax TreeView recursive open
Hello, I'm using a Treeview plugin (http://docs.jquery.com/Plugins/Treeview) with its async extension. Basic usage is very well working, I just had to change a bit the async code to suit my needs. Actually, I'm trying to recursively open given nodes ; but without success... I got an ajax result, like {"node-10", "node-50", "node-165", "node-351"} for, say, "node-2" (which is part of the first loaded three). What I want to do is : add children for node-2, in these results I'll have a node-10, add
[jQuery] Animate different elements at the same time
I want to show an animation when click an element #walker. $(document).ready(function(){ $("#walker").click(function(){ $(this).animate({opacity: "0.1", right: "+=850"}, 3500) .animate({opacity: "0.4", bottom: "+=270", height: "130", width: "100"}, "slow") .animate({opacity: "1", right: "100", height: "195", width: "150"}, "slow") .animate({bottom: "75"}, "normal"); $("#bottom2").animate({opacity: "0.1", right: "+=1200"}, 2200).fadeout(); $("#bottom1").animate({opacity: "0.1", right: "+=1200"}, 2200).fadeout();
[jQuery] Tabs and focus() input-Elements issue
Hi list We use Klaus Hartls' Tabs in a company intranet application. It's just awesome. But there is a little confusion about setting a focus on an input- field (ie. $('#myInput').focus() ). It works well when calling the Tab directly, but it would not focus when calling from the tab(s) itself. I just tested it with the demo pages from Klaus and there it would not work either. Does someone have an example or an idea of how to get around this? Thanks in adv. QT
Next Page