tag « attribute « jQuery Q&A

Home
jQuery Q&A
1.addClass
2.alert
3.array
4.attribute
5.browser
6.callback
7.clone
8.Cookie
9.Date
10.Development
11.document
12.dom
13.element
14.filter
15.Firefox
16.flash
17.format
18.html
19.input
20.internet explorer
21.json
22.mootools
23.page
24.performance
25.regex
26.safari
27.selector
28.setTimeout
29.String
30.table
31.Text
32.trigger
33.URL
34.video
35.xml
jQuery Q&A » attribute » tag 

1. JQuery , set attribute for tag    stackoverflow.com

i am use $(expr).attr("hash",value) to set a "hash" attribute for HTML anchor element "a" but the Jquery would not do that. but if i change expr to "div", then i can ...

2. Changing the attribute of a tag with jquery    stackoverflow.com

I have this html code that i want to edit with jQuery. Here is the html.

<html> 
  <head> 
    <title>JQuery Problem 1</title> 
    <script type="text/javascript" ...

3. Is there a jQuery selector to check if a tag has any attributes?    stackoverflow.com

In trying to select elements that have any attributes, the following throws a jQuery syntax error.

$("div[*]")
Is there a selector to check if a tag has any attributes? Tested with jQuery 1.3

4. Is there a html attribute to store meta information about a tag    stackoverflow.com

I have an <li> tag and I want to have some info associated with it so that a peice of javascript can access it i.e. <li id='someVal' class='someVal' meta='additionalInfo'> I would like ...

5. How to get a tag value inside an attribute?    stackoverflow.com

<li id="test">
   <a title="<span class='something1'>Some text</span> <br />
   <span class='something2'>Some text 2</span>"></a>
</li>
Is it possible to get "Some text 2"? alert(what?) UPD: The code works with jQuery Tooltip ...

6. jQuery href attribute starting with /{tag_    stackoverflow.com

I need to remove all the links in my document that start with "/{tag_" or "{tag_" so far I have $("a[href^='/{tag_']").remove(); but it's not working, I also had

   $("a").each(function() ...

7. get href attribute of enclosing link tag    stackoverflow.com

Having a little trouble on this one. I need a way using Jquery/JS to find the HREF attribute of the enclosing link tag:

<a href="something.html"><img src="img1.jpg" class="active"></a>
I want to target the img ...

8. jQuery - select tag - get attribute of the selected element    stackoverflow.com

Is there a way of getting the attribute - such as 'rel' from the selected option of the 'select' tag - i.e.?

<select name="menu" id="menu">
    <option value="1" rel="123">Option 1</option>
 ...

9. adding attribute in jquery    stackoverflow.com

how can i adding attribute into specific html tags in jquery? in example like this simple html :

<input id="someid" />
and adding attribute disabled="true" like this :
<input id="someid" disabled="true" />
thanks...

10. adding value attribute on all src tags in jquery    stackoverflow.com

can i adding some value attribute on all src tags in current html page with jquery ? in example this html :

<img src="images/slider/slide4.jpg" />
to be like this :
<img src="http://www.website.com/images/slider/slide4.jpg" />
thanks guys

11. Change the tag name but keep all the attributes    stackoverflow.com

I have something like this:

<span id="anId" someOtherAttributes....>test</span>
which I want to change into:
<a id="anId" theSameOtherAttributes...>test</a>
I have two questions :
  1. How can I change just the tag name? or
  2. How can I copy ...

12. Escaping the double quote that is in the attribute of an HTML tag    stackoverflow.com

i have a HTML page having a attribute. When i insert the attribute named "control_label". When i assign a value "Enters Your Name" in this attribute everything is okay. But when ...

14. Problem about add attribute to tag    forum.jquery.com

15. Find all tags with specific attribute    forum.jquery.com

16. Adding an attribute to an HTML tag    forum.jquery.com

17. Adding Custom Attribute Tags to HTML Elements    forum.jquery.com

Here's what I'm trying to do:1) I get reference to a div that's on my page:var theDiv = $("#" + divID);2) Now I want to add a custom attribute tag to it, so for instance I want to add "winWidth" so that the div object now contains "winWidth=" for instance.3) I want to set winWidth now since it's part of theDiv ...

19. [jQuery] Calling an element tag and the value inside one of it's attributes    forum.jquery.com

This is an odd questions. I have a huge form with a lot of data.There is a table that data in it I need to display on a print screen(of course this data isn't being displayed in the regular table). So,I put the display text in a span tag.So, this is how each item will look:Item ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.