[jQuery] Element tagName
Hi All, I couldn't find a way using jQuery to get the tagName of an element. Let's say I have this: <div><span>test</span></div> $('span').parent().tag() would return 'div' is that currently possible? I found the is() function, maybe that could be changed to return the tagname if no argument is passed Thanks! Laurent _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Loop through all elements of a form
In order to access the underlying DOM object, you use the .get(n) method on the jQuery object. $("#editarticle/form").get(0).elements.length; $("#editarticle/form").get(0).reset(); Or, using jQuery, you could get all relevant form elements like so: $("#editarticle/form :input"); And reset them like so: $("#editarticle/form :input").val(''); m. -----Original Message----- From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On Behalf Of Truppe Steven Sent: Saturday, November 11, 2006
[jQuery] Elements aren't expanding when appending new children
I'm currently trying to modify an ul-tree dynamically. Moving elements up, down and left is working perfectly. My problem is that, when moving elements right (iow creating a new ul as a child to an existing li), the parent element is not expanding, so the newly created ul is overlapping with other elements. Just look at my example page: http://xcite-online.de/tests/jquery1/ http://xcite-online.de/tests/jquery1/ . The code is http://snipplr.com/view/1649/jquery-and-uls-on-the-flow/ here , the important
[jQuery] Elements aren't expanding when appending new children
One more comment... As you probably figured out from looking at the generated source, the culprit is likely to be the animation code, which sets those unwanted attributes when it animates an item. So one good test would be to remove all animation and see if it generates better code. It will also make the interface more usable. The animation that's there now doesn't serve any purpose, and it's confusing. The elements shouldn't be zooming down to a point and then re-expanding. When I move a physical
[jQuery] Elements aren't expanding when appending new children
> I moved "Testnode" up and then moved it to the right, then
[jQuery] Elements aren't expanding when appending new children
When you have a problem like this, your first thought should be to look at the generated HTML using Microsoft's DevToolBar in IE or either FireBug or View Source Chart for Firefox. I moved "Testnode" up and then moved it to the right, then used FireBug's Inspect tool to reveal the generated HTML. This is what I saw: <div id="main"> <ul id="nodes" class="sortable"> <li id="node5" class="sortableitem"> </li> <li id="node1" class="sortableitem" style="overflow: visible; height: 164px; display: block;
[jQuery] Element tagName
> From: Truppe Steven
[jQuery] help with a simple plugin to roll images
$.fn.rolly = function(options) { var settings = { speed: 'fast', delay: 10000 } if(options) $.extend(settings, options); $.rolly.rollover(settings); }; $.rolly = function() {} $.rolly.rollover = function (settings) { $(this).children().get(0).animate( { width: 'hide', opacity: 'hide' }, settings.speed).appendTo(this).show(settings.delay); } this doesn't work ... everything I tried didn't work... help! _______________________________________________ jQuery
[jQuery] Plugin Release: Tooltip
Hi Jörn
[jQuery] Keydown Help
I have a set of rows that are currently adding a class "selected" and firing an ajax call to show information selected in another div if a subclass of "caller" is clicked. To make sure only one row is selected, I am removing the "selected" class for all rows before adding the class. Everything works perfected except now I want to allow for multiple rows to have the "selected" class and not to fire the ajax calls if the control key is pressed. This will allow me to run an ajax call on multiple rows
[jQuery] How I use jQuery
Hello jQuerilous friends, I have just launched a website and thought I would share it with anyone who might be interested. It uses jQuery heavily, mainly for hiding and showing content with animation, but also for submitting forms with Ajax etc. Klaus Hartl's Tabs 2.0 plugin gets a gig on the Services page and I also used Dave Methvin's Corners for browsers that can't handle full CSS corners (IE). All my clients love the eye-candy aspect of animation (I'm constantly having to explain why all-Flash
[jQuery] OO programming is confusing to old functional programmers
I don't think this approach will work quite the way you'd like. In your example:
[jQuery] Media plugins
I've just posted some convenience plugins for dealing with Quicktime, Flash, and mp3 media. Source and demos can be found here: http://malsup.com/jquery/media/ Mike _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] OO programming is confusing to old functional programmers
OK, How much of this is right? jQuery.Map = { // this is a public global attribute? // ie: global across all instances of jQuery.Map whatever : null, // a public function init : function(options) { // this is the jQuery search collection // self is a private pointer to the collection var self = this; // another private variable scoped to the function var _maph = 0; // an public attribute, accessed via $("#map").Map._maph this._maph = 0; // a method, accessed via $("#map").Map.recenter(x,y,dxy) this.recenter
[jQuery] Another media plugin, but that fails in Firefox 2
Hello, I'm working too on a media player (using Aflax) but I have a problem with Firefox 2. The following code doesn't work althought it used to work with firefox 1. //deal with the classes of the play button $(".play_").toggle(function(){ $(".play_on").removeClass("play_on").addClass("play_"); $(this).removeClass("play_").addClass("play_on"); },function(){ $(this).removeClass("play_on").addClass("play_"); } ); The line $(".play_on").removeClass("play_on").addClass("play_"); Generate an error : o.className
[jQuery] XML and handling namespaces
>> currently, the pipe symbol ("|") is inside expression used as an >> equivalent for a comma (","). On the other hand, it's the CSS symbol >> to select by namespaces, eg. >> <soap:envelope> would be selected with soap|envelope in CSS. >> >> So far I haven't seen anyone actually using the pipe as a replacement >> for a comma. I propose to remove this duplicate functionality and >> instead introduce namespace handling via a pipe in expressions. I agree. > Its not that simple. The | is actually also
[jQuery] Since updating to 1.0.3 & converting to getJSON
> And to make it valid JSON, you have to quote all keys anyway
[jQuery] new jQuery API draft
> Man you scared me... You meant new jQuery API "DOCS",
[jQuery] Since updating to 1.0.3 & converting to getJSON
> 4091 { asJSON: 1, class: "jlink", id: htmlDoc },
[jQuery] Element tagName
> I couldn't find a way using jQuery to get the
[jQuery] Tabs plugin 2.0
Hi jQuerians, I worked on the tabs plugin, did some clean up and changed the "API" a little bit, so that I call it v2.0 now: * to pass in the initial tab to start with you no longer specify it with an "on" option. Instead you pass the number as first parameter to the tabs() function (that's the way it was in the beginning and I found passing in the initial tab as {on: 2} a little too verbose): $(...).tabs(2); $(...).tabs(2, { // options }); No index but options works fine as well: $(...).tabs({ //
[jQuery] XML and handling namespaces
Hi jQueryians, currently, the pipe symbol ("|") is inside expression used as an equivalent for a comma (","). On the other hand, it's the CSS symbol to select by namespaces, eg. <soap:envelope> would be selected with soap|envelope in CSS. So far I haven't seen anyone actually using the pipe as a replacement for a comma. I propose to remove this duplicate functionality and instead introduce namespace handling via a pipe in expressions. Your opinions please! -- Jörn Zaefferer http://bassistance.de
[jQuery] Since updating to 1.0.3 & converting to getJSON
I am having an error only in IE with the following <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><div style="margin-left: 40px;">'expected identifier string or number' </div></blockquote><div> thats what inferior explorer (v6 on wk2) says I have googled the error and a number of pages suggest removing the last coma <a href="http://cow.neondragon.net/index.php/1404-Internet-Explorer-Javascript-Errors" target="_blank"
[jQuery] Element tagName
> > From: Laurent Yaish
[jQuery] onclick tooltip with z-index div
Hello everyone, I'm trying to reproduce the "Yahoo Search" when you click on "President Bush" in this story on Yahoo: http://news.yahoo.com/s/ap/20061110/ap_on_go_ca_st_pe/gates_in_his_words_1 with jquery. I've looked at using a few of the Tooltip plugins, but they don't do what I want. How do I get the div to work like the one o the yahoo page? Here's some code I've been playing with using the Google Search api instead of Yahoo's, but the concept is still the same. http://kevinold.com/googletest.html
[jQuery] Loading external libraries from dynamicallyloadedcontent
>> You can create a script element using document.createElement, set a
[jQuery] The jQuery Design/Coding Process
Hi. I'm kinda new to jQuery and javascript scripting. Could someone tell me of the design/coding process involved while building an application with jQuery? Are there any "best practices"? (That is, what is the equivalent of "design: first identify the use cases, then draw a storyboard/interaction diagram, then identify your actors and models, (verify,) identify classes and methods, code, debug, verify, and iterate") What is it that you start with while developing an application? (assuming that the
[jQuery] ajax form docs
This is the documentation! $.ajax({ url: "mydomain.com/url", type: "POST", data: $.param( $("#form").formdata()), complete: myAjaxDone, success: myAjaxSuccess, error: myAjaxError }); However I can't find an explenation for this line. data: $.param( $("#form").formdata()) What is "param" and what is "formdata" Is want to do something similar however javascript complains it does not know what formdata is! How can I submit a form then via ajax? _______________________________________________ jQuery
[jQuery] Tooltip reloaded
This looks great Jorn. Probably the main issue for me is that a tool-tip for an element on the right-hand-side of the screen does not adjust it's position away from the edge. Any plans to implement something like this? Even if it just defaults to showing on the left of the mouse position rather than the right? ____________________________________________ Matthew Delmarter
[jQuery] Code Documentation
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1"> <TITLE>Code Documentation</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P><FONT SIZE=2 FACE="Arial">It appears that the code documentation tags (@example, @desc, etc) are single-line entries only. Is this correct?</FONT> </P> <P><FONT SIZE=2 FACE="Arial">Is there any accepted
[jQuery] simple effects wont work in my ie
hi all, i ran into some problems/inconsistencies with IE6. I have a simple structure: <div class="container"> <div class="first">first</div> <div class="second">second</div> </div> .second { display: none; } javascript: $(document).ready(function () { $(".container").hover( function () {$(".second").fadeIn(100);}, function () {$(".second").fadeOut(100);} ); }); simple enough, but after the first fadeOut, all subsequent fadeIns do .. nothing.
[jQuery] Loading external libraries from dynamically loadedcontent
>>> As the loading of both scripts is asynchronous, the second one >>> could be started before the neccessary functions are available. >>> Any idea or workaround? >> >> If you can attach a readyState handler to the first script, that can >> be your cue to run the function or load the second script that needs >> the first one. > > Unfortunately, I can't. The script comes from an external domain, so > I cannot use XHR to load it :( You can create a script element using document.createElement, set a
[jQuery] Loading external libraries from dynamically loaded content
Hi all. I'm working on a project which will load content dynamically from files developed by an external team. These files can include scripting. * If the script is included in the loaded content, the `evalScripts` will suffice. * If the script is referenced from the loaded content (<script src="blah.js" ...>), the `evalScripts` will suffice. But there's a possibility which isn't covered: an external file which loads a library and uses it. These are the cases: 1. External library, "internal" use:
[jQuery] Plugin Release: Tooltip
> > From: Michael Geary
[jQuery] return this.each
Sorry about the slow reply, guys. Been a busy week!
[jQuery] Help: Trying to write my first plugin and its not trivial
Hi all, I'm trying to write my first plugin and I'm having some conceptual problems on how to organize stuff and getting my head wrapped around this. The plugin will be for turning a div into an interactive mapping application. So, I will start with something like this: $(document).ready(function(){ $("#map").Resizable( { onStop: function(dir) { this.Map.resized(); }, ... } ).Map( { // initialize a bunch of stuff cgi: "/cgi-bin/mapserv", fullExtent: [-160.0, -60.0, 15.0, 75.0], toolPosition: "right",
[jQuery] [Fwd: How to Add HTML to a page, and make it "active"?]
Hi Scott, I may not understand the details of your situation, but it seems you are quite close to the first part of a solution (I am no expert either). Could you just give each of your <select> fields a common class name as well as the unique id: <select id="type_1" class="dynamicSelects"> <!-- options here --> </select> <select id="type_2" class="dynamicSelects"> <!-- options here --> </select> And then your jQuery code could look like something this? $("select.dynamicSelects").change(function()
[jQuery] [Fwd: How to Add HTML to a page, and make it "active"?]
Anyone? -------- Original Message -------- Subject: [jQuery] How to Add HTML to a page, and make it "active"? Date: Thu, 09 Nov 2006 16:24:54 -0500 From: Scott Sharkey <ssharkey@linuxunlimited.com> Reply-To: jQuery Discussion. <discuss@jquery.com> Organization: Linux Unlimited, LLC To: discuss@jquery.com Hi All, Relatively new to jQuery, and loving it so far. Hopefully you can help me with this one... I have a "quote page", which has "line items" that fetch various pieces of info (via ajax) from
[jQuery] does jQuery has support for parameter handling ?
Hello everyone, i have the following problem: i want to pass a string that is encoded with the php urlencode() function via json to some javascript code. does javascript or jQuery support any way to decode such a string ? Another point: Does jQuery support any sort of URL parameter handling ? best regards, Truppe Steven _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Transparent PNG IE plugin for jQuery?
Here's one of the final pages: http://www.modernessentials.com/landing.cfm/Looking+for+the+BDI+AVION...Welc ome! Thanks everyone for your help. <!----------------//------ andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. andy@icglink.com 615.370.1530 x737 --------------//---------> -----Original Message----- From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On Behalf Of Andy Matthews Sent: Thursday, November 09, 2006 4:19 PM To: jQuery Discussion.
Next Page