search for: classnam

Displaying 20 results from an estimated 280 matches for "classnam".

Did you mean: classname
2005 Sep 25
2
Preventing/allowing exceptions to occur in Element.add/remove ClassName
Hello everyone ! Thomas asked me to discuss here the behavior of Element.addClassName, as relating to ticker #2232 [1]. In HEAD, if the element passed-in to Element.addClassName does not exist, an exception is thrown, and script execution stops there. I believe this is inconsistent with other functions: Object.extend(Element, { hasClassName: function(element, className) {...
2024 Mar 11
1
R6 "classname" and generator name
I'm writing some code that does a bit of introspection of R6 classes and am wondering about the "classname" parameter. Its the first parameter to the "R6Class" class generator generator function, and the few examples I've looked at on CRAN set it the same as the name of the generator function, for example, from the docs: Queue <- R6Class("Queue", .....) but this isn...
2005 Nov 09
1
Element.removeClassName(..) - bug or incorrect usage?
...have just started using prototype.js and scriptaculous.js in one of my projects. These libraries are awesome and they let me do so much more, so easily. At some point in my web interface, I have an element with multiple classes, out of which one class needs to be removed. I am using Element.removeClassName(element, "classname to remove"); to achieve this. This call does remove the specified class name. So far so good. But after the call, instead of a space, the remaining classes are separated by a "," and IE and FF do not apply these remaining classes. The problem is better rep...
2006 Jun 21
3
getElementsByClassName
How should I expect the performance of this function to be? I wrote this code: function CreateTOC(){ var $aTOC = document.getElementsByClassName(''tocitem''); if(isArray($aTOC)){ $temp = ''<INPUT TYPE="SUBMIT" NAME="cmdSave_Update" VALUE="Close" CLASS="menubuttons"> ''; $temp += ''<INPUT TYPE="SUBMIT" NAME="cmdSave_Update" V...
2007 May 20
2
Get first class name
I have a situation where I need to get the first class name of an element. Element.ClassNames() returns an object not an array... Object.values() will turn it into an array, but the API Docs say that the order of the resulting array is browser-dependent.. So for my use is no good... So I am using: el.className.split(" ").first(); Can any one see any problems that I might...
2005 Aug 21
0
Patch for Element.Class - wrong regexp
...t; arguments.length; i++) { - regEx = new RegExp("^" + arguments[i] + "\\b\\s*|\\s*\\b" + arguments[i] + "\\b", ''g''); + regEx = new RegExp("(^|\\s)" + arguments[i] + "(\\s|$)", ''g''); element.className = element.className.replace(regEx, '''') } }, @@ -232,14 +232,23 @@ } }, - // returns true if all given classes exist in said element + // expects arrays of strings and/or strings as optional paramters + // Element.Class.has_any(element, ['...
2009 Sep 24
1
R v2.10.0: Doc clarification for cross references and where are we heading?
...ay as the string <name>. D. \link{<packageName>:<name>]{<label>} - where <name> must be a \name{<name>} in a package named <packageName>. The link will be display as the string <label>. There are no restrictions on <label>. E. \linkS4class{<className>} expands to \link[=<className>-class]{<className>}. From (B) it then follows that there must be an \alias{<className>-class} and a \name{<className>}. Q1. Is that correct? To me it look a bit inconsistent. Q2. Are there more? Q3. Will there be more? Q4. What abou...
2006 Mar 07
12
rjs and partials
I''m trying to update a list, and having a hard time applying visual effects to the latest element created. Here is what I''m doing. =========================================== 1) Creating an "item" via an action, then rendering the RJS template 2) RJS template looks like this: page.insert_html :top, ''items'', :partial =>
2006 Aug 01
6
Newbie: How to use text_field with Java Script
<input type="text" name="date1" id="dateField1" onchange="magicDate(''dateField1'');" onfocus="if (this.className != ''error'') this.select()" /> How could I generate above text filed using ruby? I am not sure how to give the options such as onchange, onfocus, id and so on? could some one please help. -- Posted via http://www.ruby-forum.com/.
2006 Mar 01
0
RE: manipulate <td>''s and their content by grabbingtheir classNames
...bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of troels knak-nielsen Sent: Wednesday, March 01, 2006 12:28 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] manipulate <td>''s and their content by grabbingtheir classNames <p align=\"left\"><b><font face=\"Arial\" size=\"2\">GFI MailSecurity''s HTML threat engine found HTML scripts in this email and has disabled them.</font></b></p>You could make a controller-object, which keeps a pointer to...
2006 Feb 16
3
Retrieve a property defined in a css
Hi all, I have a property, defined in an external stylesheet: .my_class { background-color: #FF0000; } I want to retrieve the value of this background-color of the class my_class. How can I do that with prototype/scriptaculous ? Thanks in advance, Nicolas Terray
2006 Jul 25
1
Feeling silly
...know why, but I am drawing a complete blank on something that should be easy. I''ve been searching, perhaps using wrong terms, and still not coming up with anything. Here''s what I''m trying to do: <div class="button" onMouseOver=''this.className="button_hover"''; onMouseOut =''this.className="button"''; onClick =''this.className="button_click"; open("/main/test");''> Clear Event...
2005 Aug 09
7
trunk restructuring, new util.js
Hi all, The latetest trunk revision 1983 features are more streamlined directory layout and a new util.js file, that acts as a collector for stuff that doesn''t fit in elsewhere. To get a grip at the new Builder functionality look at the test in test/unit/builder_test.html (works only with Firefox). Note the "klass" instead of "class", this circumvents a
2006 Mar 01
2
RE: manipulate <td>''s and their content bygrabbingtheir classNames
> Or... > > var myTDs = new Array(); > $A($("main").childNodes).each(function(tr) > { > $A(tr.childNodes).each(function(td) > { > myTDs.push(td); > }); > }); You''ll probably want to make sure the tr elements are TR tags and the same for the td''s, as empty text nodes are inserted randomly by the gecko engine (and maybe others). Greg
2006 Jan 06
3
image replacement (new Effect.*****) problem
...I can''t figure out how to link the large image inside of the samll image tag. Thanks again for any help! <%= image_tag url_for_file_column(product, "image_url"), { "class" => "small_product", "onMouseOver" => "this.className = ''product_hover''", "onMouseOut" => "this.className = ''small_product''", "onClick" => "new Effect.Shake(this); new Effect.Fade(''large_image''); document.getElementById(&...
2006 Mar 01
1
manipulate <td>''s and their content by grabbing their classNames
Hi Guys, What''s the best way to grab all <td>''s in a particular table and manipulate them? Here''s the problem definition - I have a table that has ''n'' <tr>''s. Each <tr> has couple of <td>''s and the first <td> has an image. By default, each <td> has a ''x'' class and image src
2007 May 28
7
$$ is slooooow in IE
While $$ and getElementsByClassName are ridiculously speedy in Firefox (thanks to XPath), I''m finding both functions to be intolerably slow in IE. The page I''m working with has fewer than 1000 elements -- doesn''t seem THAT big -- and it''s still taking upwards of 4 seconds (!) to pick out the righ...
2008 Jan 09
4
Using Prototype - Getting Javascript Error - "Object doesn't support this property or method"
...se echo $dh; ?>", "8", "#000000"); so.addParam("wmode", "transparent"); so.write("videoPlayer"); } function assignB(o) { listItems = $("vidList").childElements("li"); listItems.each ( function(item) { $(item).className = $(item).className.replace("yellowdot",""); } ) var eElement = Event.element(o); eParents=eElement.ancestors(); eParents[0].className += "yellowdot"; } </script> --~--~---------~--~----~------------~-------~--~----~ You received this message because yo...
2006 Mar 01
0
RE: manipulate <td>''s andtheircontentbygrabbingtheir classNames
...ls-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Wednesday, March 01, 2006 1:57 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] manipulate <td>''s andtheircontentbygrabbingtheir classNames > Ahh... Haven''t run up against that yet. Although I also completely > disregard Gecko/Safari and other totally crappy, useless, browsers :-). > > </cynicism> Gecko = Mozilla/Firefox, or was I misremembering the name? Anyhoo, Firefox is where I''ve seen the...
2005 Dec 20
9
Performance issues with Prototype
Hi I''ve tried to use Prototype as a base for few large intranet applications I''m working on. Unfortunately I encountered some serious performance problems when working with Internet Explorer. It''s really sluggish when it comes to DOM operations and Prototype could really benefit from some small optimizations. I created a testase to show a difference between my optimized