[jQuery] Dragging from a Drupal block to tinyMCE
I'm using Drupal 5.1 and jquery to build a site where members can create content. I wrote a module to display a list of available images and videos in a list in a block. I'd like to be able to select an item from the list and drag it into the article body textarea, and wondering if this can be done without modification of core Dupal functions. If drag&drop is not possible, could this be done by selecting an item and clicking in the textarea? I'd appreciate any example or tutorials on how this could
[jQuery] .parents(expr)
I could do a test, but discussion seemed like it might turn up something else... .parents(expr) supports an expression to filter parent elements, e.g., .parents('.getme') // returns all parents with class getme the $(expr) in general allows any css (or xml) selector. Does expr extend this way in parent(expr) to retrieve all <li> children under a parent? e.g., .parents('.getme > li') as a shortcut for .parents('.getme').children('li') Sam
[jQuery] Forcing a select box to "select" a specified option
<!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.16441" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=763094021-29052007>I'm doing a related select dropdown here (bottom middle of the page):</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=763094021-29052007><A href="http://w3.normreeveshonda.com/pages/page.cfm?pageid=80976&pagetype=26&featureid=-1">http://w3.normreeveshonda.com/pages/page.cfm?pageid=80976&pagetype=26&featureid=-1</A></SPAN></FONT></DIV>
[jQuery] Help with form plugin and tabs in a same page
Hi all I have a very basic form with Jorn Form Validation and Tabs plugins inside. Looks very simple like: <div> <div id="AuxData" style="width:100%"> <ul class="anchors"> <li><a href="#personal">Personal data</a></li> <li><a href="#family">Family data</a></li>
[jQuery] object detection in jQuery
Hi all, before jQuery, I was used to check for existence of certain elements like this: if (!document.getElementById('myElem')) { return false; } else { doSomething(); } Is there some jQuery way of doing this, or should I use the old DOM one? Thanks! Bohdan
[jQuery] Dev and plugins lists
Are the dev and plugins lists up at the moment? -- Mika Tuupola http://www.appelsiini.net/~tuupola/
[jQuery] jQuery'zed Ext.Template
Hi, I made a simple port of Ext.Template [1] / Ext.MasterTemplate [2] to be used with jQuery, removing Ext dependencies and so. The result is tiny - 2,4KB packed, and given that it can make other codes smaller, I think it is worth. Here's the code (feedback appreciated, I'm not a javascript master! ;): http://dev.tipos.org/browser/javascript/jquery/template/jquery.template.js?format=txt I still have three global functions while I'm looking for alternatives in the jQuery world. I'm looking for something
[jQuery] Select box change event infinite loop in ASP.NET
I have a simple function to capture the OnChange event of a drop-down select box. In MSIE, it works as expected, but Firefox gets caught in an infinite loop. Has anyone else seen this problem? I have a counter to track the problem. In MSIE, the counter goes up by 1 for every change. In Firefox, the counter jumps by 21 with every change. I guess 21 is some recursive limit inside of Firefox. jQuery 1.1.2 and ASP.NET 2.0. var count=0; $(document).ready(function() { var selectBox = "$<%= Me.FormView1.ClientId
[jQuery] How do i remove an event?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Arial">Hi all, I'm struggling to understand how to remove an event listener in jquery. I have this basic code: $('div#topLineHover').hover(function() { $('#topLine').slideDown('slow'); }); Now, once the topLine div has appeared, i want to stop this code from working any more. At a later point, upon another event being triggered, i'd like to
[jQuery] A demo and an optimization question
Hi everyone, First of all, jquery is pretty damn awesome and has made Javascript fun. I've been using jquery to build an icon picker for FAMFAMFAM's Silk icon set. I've got a working version (at http://dsingleton.co.uk/code/icon-selector/), but with 1000 images on the page everything is a little slow, i'm wondering what I can do to optomize the JS make it a little snappier? (This is also the first time i've used jquery for anything substantial, so any tips, suggestions or corrections would be much
[jQuery] Automatic scrolling?
I have a web page with a user-selectable number of quiz questions. Each question is in a list element. Sometimes users select 250 quiz questions which is a lot... I wanted to solicit thoughts about automatically scrolling to the next question when a choice is made (when a radio button is selected)... Is there any support in jQuery which would allow me to get the next list element object (that's easy), then scroll the window so that the next list element is positioned neatly at the top of the window?
[jQuery] Automatic scrolling?
I have a web page with a user-selectable number of quiz questions. Each question is in a list element. Sometimes users select 250 quiz questions which is a lot... I wanted to solicit thoughts about automatically scrolling to the next question when a choice is made when a radio button is selected ... Is there any support in jQuery which would allow me to get the next list element object that's easy , then scroll the window so that the next list element is positioned neatly at the top of the window?
[jQuery] click on IE won't work in multiple frame application along with other inconsistancies
I have an html page with two frames named: A and B. All javascript functions are in top object. document A has an element "<div id=sample>sample test</div>", I'm trying to attach an click event to it from top object like this: var obj = top.A.document.getElementById('sample'); // jquery format like $('#sample', top.A.document) // doesn't work on this. $(obj).click(function(){ alert('test'); }); Same code works in Safari, but not in IE. Another issue is with ".html" method. When I do use $('#id',
[jQuery] Getting ThickBox to work with other libraries
Hi guys. I have developed a web app and am making various AJAX popups using Thickbox. However some of these popups use other JS libraries (eg: scriptaculous). I have tried to implement the suggestions in this link: http://docs.jquery.com/Using_jQuery_with_Other_Libraries but didn't help, I tried all three ways and had no success. So basically my webpage has a few links and on one of the links once its clicked it opens a popup (meant to) and there you can use scriptaculous to edit some text. Now if
[jQuery] How to manipulate background position
I have tried many ways but it seems this is not possible. The css function does not allow me to use two values for background position with a space between the values and gives an error that ")" is missing when I use this css("background-position","0 50%"). Even if I use this css({background-position,0 50%}) it does not work and gives an error. Can someone please throw some light on this property and how can I use it to manipulate the background image position. I want to use it for css sprite kinda
[jQuery] Trouble with validate plug-in
We're trying to get set up with the Validate plug-in. This is the scenario: JQUERY =================== $(document).ready(function() { $("#myForm").validate(); }); HTML =================== <form action="#" method="post" id="myForm"> ... </form> But, when the submit button is pressed the following error is through in the FF javascript console: Error: jQuery(element).data is not a function Source File: XXX Line: YYY The piece of code which it refers to is in the jquery.validate.js which is the last
[jQuery] CSS3 support
Hi All I know I'm dreaming and it's probably not realistic but on the front of the jQuery site is the following proclamation: "CSS3 Compliant · Supports CSS 1-3 and basic XPath" Should that proclamation really say "CSS3 Compliant (selectors) because AFAIK jQuery doesn't appear to support any CSS3 declarations like border-radius for example. I understand there are a thousand and one whacky ways for JS to manipulate the DOM into presenting rounded corners and this is generally a bad thing in terms
[jQuery] Autocomplete error
Anyone have problems with the autocomplete plugin from bassistance? jQuery(input).offset is not a function [Break on this error] var offset = jQuery(input).offset({scroll: false, border: false}); In this line: var offset = jQuery(input).offset({scroll: false, border: false}); After the first key pressed. $("#months").autocomplete(months, { minChars: 0, max: 12, autoFill: true }); the months is only for test -- []´s Jean www.suissa.info Ethereal
[jQuery] RFC: jQuery Figures/Cutlines plugin
'lo, all. My interests often fall into the range of enabling more "traditional"(to print) structures/conventions and typography on the web, so that's where my first shot at a plugin went. It's not particularly impressive in any programming sense, but I'm fond of it. See here: <a href="http://pioindustries.com/projects/jquery/jquery-figures">http://pioindustries.com/projects/jquery/jquery-figures</a> Everything you should need is in the source, including explanation of a few things that might seem
[jQuery] Menu not working in Firefox 2.0
hi, could someone can tell me why menu on my page not working properly in firefox 2.0 (two last items: "Humor" and "Kontakt")? On ie and opera everything is ok :P
[jQuery] WYMeditor hiccups
http://studybreaks.com/story.php and click "Preview" within the WYMeditor FireBug is telling me: $j has no properties fWYM_INIT_DIALOG(0)jquery.wymeditor.... (line 1263) onload(load )story.php (line 1) [Break on this error] if($j.isFunction(wym._options.fPreInitDialog)) jquery.wymeditor.... (line 1263) jQuery is not defined [Break on this error] null However, $j is defined globally throughout jquery.wymeditor.js, as: var $j = jQuery.noConflict(); Why would it not be defined in fWYM_INIT_DIALOG()
[jQuery] Treeview Questions
I've been looking at the Treeview Plugin and have a few questions. (1) When a tree is expanded I would like to style a hovered or clicked li. The problem I'm having is that all li's in the tree get the style. I have tried to us stopPropagation and return false but neither solve the problem. (2) Similar to problem one, when clicking an item I need to get the li html. The problem here is similar to (1) in the case where the tree node (an li) has branches, and .htm() returns the text for the clicked
[jQuery] OOP's *this* messing up $().each()'s *this*
Confusing title, but whatever. So basically I'm working on my first OOP script, and I just ran into a bit of trouble while trying to reiterate over an amount of <td>'s, using each() function classname() { var mainvar =new Array("example","array"); this.functionname = function() { $('td.number').each(function(_i) { $(this).html(this.mainvar[_i]); }); } } So how would I go about doing this? Is there an alternate way in Javascript to reference without using
[jQuery] Jorn Form Validation help - how to know when a select field is selected
Hi all I have a dependent validation routine with Jorn Validation Form plugin. Works like a charm. But I need to validate dependent fields when a select field option is "selected". Looks like wife:{required: function() {return $("input[@name='maried_single']").filter('[@checked]').val() == "1";}}, But doesn't work. How to get the selected field option?
[jQuery] Radio button validation
I've got a bunch of radio buttons, all with the name "type" and all with different id's (type1, type2 etc.), and for some reason the validate plugin doesn't protest when I don't select a radio button, and I don't get any javascript errors either. Here's the code: $("#addForm").validate({ focusInvalid: false, event: "blur", rules: { type: { required:true } }, messages: { type: "Please choose type" } }); ------------------------------------- And here's the html
[jQuery] Masked Input Field
Im asking alot of questions today, sorry. Trying to use this. <a href="http://digitalbush.com/projects/masked-input-plugin">http://digitalbush.com/projects/masked-input-plugin</a> It is an awesome plugin by the way! I have one field called creditcard (guess what goes in there) And another select called credtcardType (amex, visa, mc, discover) I want to put in the spaces like this 9999 9999 9999 9999. But for Amex I want 9999 999999 99999. Ultimately, I want to submit to the server without spaces.
[jQuery] Attribute selectors
Hello everyone, In a project, a few weeks ago, I needed support for something like @attr!="val", that is selecting all attributes which don't have a certain value (for example selecting all divs which don't have a certain class). I was wondering if support for something like this is planned, if it's a good ideea or somebody else needed this (of course, I think other operators could be negated as well, like @attr!^="val"). Adrian.
[jQuery] Event binding for both body.click AND body.change?
Hi folks, Quite awhile back, Karl pointed out to me the fantastic article about event binding for ajax. I've since implemented the following function $('body').click(function(e) { if ($(e.target).is('img.closebutton')) { var attribute = "close"; buttons($(e.target), attribute); } (snip) where "buttons" handles things. Everything on the page that needed to be handled was an image or text click, so this solution worked fine. However, now I have a dropdown I need to integrate onto the page,
[jQuery] Question about scroll in dimensions plugin
The description of the usage of the scroll option is that it controls whether or not the scroll offsets of the parent elements should be included in the calculation of an element's offset. With reference to the http://dev.jquery.com/~brandon/plugins/dimensions/test/offset.html visual test page, this works fine for Absolute3, Static3, and Inline1, all of which are within the scrollable Relative3 area. My problem is with Relative3 itself, in that if you scroll it, the offset is calculated (with scroll:true)
[jQuery] Problem with maskedinput + load
I´m passing a input value with load function and this ionput with mask dont send any value but without works normal, who know why?? and i already tried with #id of input //mask na consulta de os $("#os_id").maskedinput("9999", " "); //consulta OS $("#Consultar").click(function(){ //$("#container_formulario").hide(); $("#loader").load("listar_os.php", { acao: "consultar", os_id:
[jQuery] NEWS: Pt 6 of the My First ExtJS DataGrid Series
Steve "Cutter" Blades has released the sixth part of his "My First ExtJS DataGrid" series. He's using the jQuery bridge in his examples which is very cool. Be sure to check it out: http://blog.cutterscrossing.com/index.cfm/2007/5/26/My-First-ExtJS-DataGrid-Pt-6-The-Grid Rey... -- BrightLight Development, LLC. 954-775-1111 (o) 954-600-2726 (c) rey@iambright.com http://www.iambright.com
[jQuery] History/Remote - jQuery Plugin
<div>Hello Klaus,</div> <div> </div> <div>Thank you for a wonderful plugin.</div> <div> </div> <div>Apart from the lack of documentation (for beginners who cant figure everything out reading your code :), I am facing the following issues:</div> <div> </div> <div>I am using the plugin from here:</div> <div><a href="http://www.stilbuero.de/jquery/history/">http://www.stilbuero.de/jquery/history/</a></div> <div> </div> <div>(1) Whenever I click on any link and follow everything detailed in your code
[jQuery] jQuery plugin structure help
Hi all, I'm attempting to take the next step into my understanding of jQuery (and JavaScript for the matter) by putting together a simple plugin. Although all the bits are in place; I'm having trouble bringing it all together in a satisfactorily elegant package. This is what I have so far: http://www.ollicle.com/eg/jquery/autolineheight/ How do I best incorporate the event binding (currently in index.html): $(function(){ // On ready $('#one,#two').autolineheight(); //
[jQuery] get the current mouse position
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Helvetica, Arial, sans-serif">Hi i have to build a custom tooltip how can i get the current x and y mouseposition? </font> </body> </html>
[jQuery] PNG background Tiling
Does anyone know of a way to make IE6 tile background PNGs with transparency? Glen
[jQuery] compressed blockui
i've downloaded blockui. Nice work, but it want not to be compressed because of a missing colon on line 199. Mike, maybe you can fix it up? Regards, frank aka dfd
[jQuery] 15 second delay with IE
Hi, I am truly impressed with JQuery but I have an approx 15 sec delay to open a page in IE (version 7.0) that uses JQuery. No such problem with Firefox and Opera where a page opens instantly. Can anyone offer any help? I have been using a basic example, as below, but can not get rid of the delay. Thanks, mike <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>JQuery:
[jQuery] Text Button
Hi, Is this the best way to make a text button? <a href="#">Click Me!</a> It's nice that even with using <a href="#"> jquery could make almost any tag to have click event, but the problem is the cursor doesn't indicate that it's clickable. Thanks in advance for any tips, suggestion, guides cheers, james
[jQuery] Debugging jQuery 0.2
A minor upgrade. a neat feature to help debugging bound events, like click and keyup... plus clicklogger to report back where your users clicked and when! <a href="http://jqueryjs.googlecode.com/svn/trunk/plugins/debug/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://jqueryjs.googlecode.com/svn/trunk/plugins/debug/</a> -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Safari append to empty div
well, I've developed an admin system which rely heavely on jQuery. But, safari can't seem to append html to empty div's (or perhaps any div) - is there a fix to this? im doing something like this: var str = 'lorem ipsum'; $("#emptyDiv").append(str); But nothing happens, works in firefox though =/
Next Page