Hey folks
I have some simple HTML:
<div id="selectorContainer">
<div id="chainedSelector" style="display: none;"><% Html.RenderPartial("ProjectSuggest/ChainedProjectSelector"); %></div>
<div id="suggestSelector"><% Html.RenderPartial("ProjectSuggest/SuggestControl", new SuggestModeDTO{RegistrationMode = Model.RegistrationMode})...
Can any one suggest a link or an example to create an atlas like tool using jquery
What does google maps use?
Thanks..
...
I'm slowly getting up to speed with jQuery and am starting to want to abstract my code. I'm running into problems trying to define click events at page load.
In the code below, I'm trying to run through each div with the 'block' class and add events to some of its child elements by selecting them by class:
<script language="javascript"...
I have a list of items
<div id="item1">somestuff</div>
<div id="item2">somestuff</div>
<div id="item3">somestuff</div>
When someone clicks on one of these, I need to take some actions based on the id (the number). Let's say hide it.
How can I make the function generic, and how can I pass the id into the function?
$(document).ready(f...
Hi,
I'm trying to use jQuery to make an ajax request based on a selected option.
Is there a simple way to retrieve the selected option id (e.g. "id2") using jQuery?
<select id="my_select">
<option value="o1" id="id1">Option1</option>
<option value="o2" id="id2">Option2</option>
</select>
$("#my_select").change(function() {
...
I need to select elements based on values stored in an element's .data() object. At a minimum, I'd like to select top-level data properties using selectors, perhaps like this:
$('a').data("category","music");
$('a:data(category=music)');
Or perhaps the selector would be in regular attribute selector format:
$('a[category=music]');
...
I need to do something only if all the li's in a given ul are hidden.. this doesn't seem to do the trick. is there a way?
if ($('#some_ul li:hidden')) {
// do something only if all 'li's in a given ul are hidden
}
...
Hi there, I am using phpQuery in order to apply some twaks to editorial content. As its syntax is the same as jQuery, I consider this a dom scripting issue.
To get rid of elements which are not representing anything, but wrapping other stuff (like the div in <div><p>blah</p></div> I came up with this selector:
$doc['div:not([alig...
Hi All,
I am trying to get values from adjacent columns, when a radio button is clicked for that row.
I'm able to do so, but the problem I'm facing, when there are more elements in the radio button column, then i am getting null values(i.e 2nd row is not working). Please help...Code is all follows
<table id="dist_list" class="data">
<t...
I'm trying to find all LIs with name=checked and hide() them, but this doesn't seem to be working:
$('li').attr("name","checked").hide();
<li name="unchecked" style="display: inline;"><a href="/">Home</a></li>
Any ideas?
...
re,
I have a simple query that works:
$("#test > fieldset > input").each(function() { })
However, I want to select "input" and "select" elements without having to write 2 "each" queries. Is this possible?
thanks.
...
In jQuery I'm trying to select only mount nodes where a and b's text values are 64 and "test" accordingly. I'd also like to fallback to 32 if no 64 and "test" exist. What I'm seeing with the code below though, is that the 32 mount is being returned instead of the 64.
The XML:
<thingses>
<thing>
<a>32</a> <-- note, a here i...
Currently I have this JQuery script
var img = $(this);
img.wrap('<div class="photo"></div>');
img.parent().append("<p>" + img.attr("alt") + "</p>");
which successfully turns the following:
<img src="photo.jpg" alt="caption">
into this
<div class="photo">
<img src="photos.jpg" alt="caption"/>
<p>caption</p>
</div...
Something like
$('.mydiv' :eq(n) 'img')
but yeah that is a terrible way of writing it ah, help?
...
What is the best way to write this function ontop of jQuery.
Background: I'm working on a legacy web app that has lots of issues. It requires us to insert a IFrame to take care of a few "screens". Later this code will be refactored out but for now we need this.
function openIframePage(selectorPath, url) {
if ($(selectorPath).leng...
I've got this html:
<table>
<tr style="display:table-row"><td>blah</td></tr>
<tr style="display:none"><td>blah</td></tr>
<tr style="display:none"><td>blah</td></tr>
<tr style="display:table-row"><td>blah</td></tr>
<tr style="display:table-row"><td>blah</td></tr>
</table>
I need to count the number of rows that don'...
hello,
i have the below sample code for a navigation list:
<div id="menu">
<ul>
<li><a href="#sect1">link 1</a></li>
<li><a href="#sect2">link 2</a></li>
<li><a href="#sect3">link 3</a></li>
</ul>
</div>
and some jquery code:
$("#menu li").click(function () {
var mylicontent=$(this).html();
});
i want to get both html conte...
I have an arbitrarily deep list, like so:
<ul>
<li></li>
<li>
<ul>
<li></li>
<li>
<ul>
<li></li>
<li></li>
</ul>
</li>
</ul>
</li>
Using jQuery, how can I select every li in the list that is not a leaf node. In other words, I want to select all of the li elements that have children ULs.
Th...
I'm trying to query an element and its children to find ID's that begin with a particular string.
var foundIDs = containerElement.find('[id^=something]').andSelf().filter('id^=something');
The find() method only searches descendants so I thought I'd try andSelf(). However, andSelf() does not take a selector. This means that the cont...
using jQuery i am trying to find out all the URLS that user has entered which are not starting with http or https and finally i want to prepend http to all such URLs so that when user clicks on them they are taken to a proper site instead of broken link caused due to entry of URLs without http or https.
Also like to mention that User h...