element

Question about HTML elements and custom attributes

Possible Duplicate: Custom attributes - Yay or nay? Is it appropriate to create custom attributes for HTML elements as so: <input type='text' value='name' custom_attribute='value'> This seems a little hacky and I'm not sure if it is supported largely or exactly how it would be accessed via DOM. ...

How to set value for the form element using mootools

I have a form that have input element and the select element with multi select. so how can I set value for the input element and select element in mootools. ...

List of elements

Hello, I have some links at the page like: 123test.com/456 abc_test.com/sdfsd abc_test.org I have to get all elements which href attribute consists of test word. I know how to click at such link by given number: selenium.click("//body/descendant::a[contains(@href,'test')][2]") This code will click at second link which has 'test' i...

Select element after adding it

Hi, I have the following code img.after('<li></li>'); Which works correctly and add the "li" element. Now I want to select the "li" element; it doesn't have any class or ID, but I want to select it just after creating it, so I'm able to use it (for example mynewli.addClass()) as a jquery element. How can I do that? ...

How to activate a jQuery Animation when an object slides under the mouse (not onmouseover/onmouseenter)?

I have a sliding image "wall" that slides in the opposite direction of mouse movement with easing. I have a selector for all "a" link elements with a mouseover binding to animate the opacity of the image it contains (highlight effect). If I move the mouse quicker than the wall moves, the wall will catch up but the animation will not ta...

How can I add child elements in XML inside particular parent node?

I have serialized a following log class: [Serializable] [XmlRoot("Log")] public class Log { [XmlElement("ErrorLog")] public ErrorLog Error { get; set; } [XmlElement("MessageLog")] public MessageLog Message { get; set; } } public class ErrorLog { [XmlElement("ErrorMessage")] public string ErrorMessage { get; se...

add VML elements (images) with javascript

hi I've been trying to add VML image elements using javascript. now here is what I'm using to generate these images: function add_tools() { var elemm = document.createElement('rvml:image'); elemm.setAttribute('src', 'pic.png'); elemm.setAttribute('id', 'gogo'); elemm.setAttribute('class', 'rvml'); document.body.appendChild(elemm...

Is there a way to create your own HTML element?

Is there a way to create your own HTML element? I want to make a specially designed check box. I imagine such a thing would be done in JavaScript. Something akin to document.createHTMLElement but the ability to design your own element (and tag). ...

do touch events not work with text-input elements in iPad Safari?

In iPad Safari, I have programmed a DIV's touch-events so that when you touch inside the DIV and hold your finger there for 500ms, the DIV's background color changes. When I try to move the code over to a text-input element (inside a fieldset), making it the touch-target instead of the DIV, the code doesn't work. The text-input becomes ...

add onclick event to newly added element in javascript

Hi I have been trying to add onclick event to new elements I added with javascript. the problem is when I check document.body.innerHTML I can actually see the onclick=alert('blah') is added to the new element. but when I click that element I don't see the alert box is working. in fact anything related to javascript is not working.. here...

Ant macrodef: Is there a way to get the contents of an element parameter?

I'm trying to debug a macrodef in Ant. I cannot seem to find a way to display the contents of a parameter sent as an element. <project name='debug.macrodef'> <macrodef name='def.to.debug'> <attribute name='attr' /> <element name='elem' /> <sequential> <echo>Sure, the attribute is easy to debug: @{attr}</echo> <...

Jquery, getting style: background (not background-color), border, etc, can't figure out how to do this

It seems that firefox automatically combines things, such as it takes individual css values, such as for "border-color", "border-width" and dumps them all into "border".. this makes things a pain for jquery as the .css selector can only select the individual ones, like "border-color", not just "border" or "background".. I need to get the...

Jquery cannot access $(this) in callback function

Hello, I am creating a plugin and it cannot access $(this). A simple overview of my plugin is (function($){ $.fn.myPlugin= function(options, callback) { return this.each(function(){ $(this).click(function(){ // some plugin works .. callback(); }); ...

Jquery check whether element is hidden (continuously)

Hello, How to check whether a element is made to hide at once. i.e how to notify the visibility of an element. In my case, the element is made to hide by slideUp function. At once i should be notified about the visibility of the that element. I got the idea of using bind() method. But it does not have a onHide like event. So how to ge...

Table caption element is causing page to break when printing

Hi there, Consider the following table: <table> <caption>The caption</caption> <thead>...</thead> <tbody>...</tbody> <tfoot>...</tfoot> </table> The table renders right when displaying on screen, but when printing it breaks the table for a new page. When I delete the caption element or display:none, the table renders right on printin...

How to move HTML element

How to move HTML element to another element. Note that, I don't mean moving element's position. Consider this HTML code: <div id="target"></div> <span id="to_be_moved"></span> I want to move "to_be_moved" to "target" so "target" has child "to_be_moved" now. So the result should be like this: <div id="target"><span id="to_be_moved"></...

Can't find flowed text element by ID in SVG

I've been playing with animation in an SVG: http://imgh.us/renamon-animtest.svg (links to script "anim.js") In the window.onload event, I have: function init(evt) { if(window.svgDocument == null) { if(evt.target && evt.target.ownerDocument) svgDocument = evt.target.ownerDocument; else if(evt.original...

jquery how to find if div with specific id exists

I've got a function that appends a div to an element on click. The function gets the text of the clicked element and assigns it to a variable called 'name'. That variable is then used as the div id of the appended element. I need to see if a div id with 'name' already exists before I append the element but I don't know how to find thi...

Mootools: How to create new element `span` inside `li` element on mouseove?

The HTML code: <ul id="el"> <li></li> <li></li> <li></li> <li></li> </ul> How to create new element span inside li element on mouseover? <ul id="el"> <li></li> <li></li> <li><span></span></li><!--on mouseover > new element span--> <li></li> </ul> ...

xmldoc.Childnodes.item() question

I decided to try out the tutorial on this website http://www.csharphelp.com/2006/05/creating-a-xml-document-with-c/ Here's my code, which is more or less the same but a bit easier to read using System; using System.Xml; public class Mainclass { public static void Main() { XmlDocument XmlDoc = new XmlDocument(); ...