I've made a jquery/ajax function that updates #courses, sending #fos's .val() and .text(), specifically of the one that is selected, like so:
$('#selling #fos').change(function() {
$.post('/ajax/courses',
{
fos_id: $('#selling #fos').val(),
name: $('#selling #fos :selected').text()
},
func...
For context, this is a followup to an earlier question. Rather than digging through cssRules, I'd like to base the logic on jQuery selectors that search for the effects of those rules.
Given default properties of
.commentarea .author:before {
background-image: url(http://...);
background-position: -9999px -9999px;
/* ... */...
Hi,
in this example the dialog is added to an #dialog-confirm element. But I want it to be added just to the body and I do not want any predefined div#dialog-confirm element in my html. So how do I realize that?
...
<table>
<tr>
<td>
<div>
<input type="checkbox" id="home1">Home1</input>
<input type="checkbox" id="home2">Home3</input>
<input type="checkbox" id="home3">Home3</input>
<input type="checkbox" id="home4">Home4</input>
</div>
</td>
<td id="selectedhome"> </td>
</tr>
</table>
<input type="button" value=...
Hi,
i don't know why, but i got this already to work but today it stopped working. The base code is:
$(document).bind("keydown", function(e){
if (e.keyCode) code = e.keyCode; // für alle Browser
else if (e.which) code = e.which; // für ie
if(code==8) {
$("#outer-frame").fadeOut(400, function (){ //conten...
In the below code how to get the checkboxes that are selected only and remove it from the list using jquery and populate the removed html in the div
<div id="section_val">
<input type="checkbox" name="a_d" value="1">a_d</input>
<input type="checkbox" name="a_d" value="2">a_d1</input>
<input type="checkbox" name="a_d"...
<div id="a_all">
<div>  <input type="checkbox" name="m_a">1</input<br></div>
<div>  <input type="checkbox" name="m_a">2</input<br></div>
<div>  <input type="checkbox" name="m_a">3</input<br></div>
<div>  <input type="checkbox" name="m_a">4</inpu...
In the below code how to pass the div object inside validate function
<div><input type="text"></input>   <a href="#" onclick="validate("Hot to pass the div objevt here")"</input>
<script>
function validate()
{
.....
.....
Finally remove the div
}
</script>
...
I have the following HTML:
<div class="result-row odd">
<div class="domain-name">first-domain.com</div>
<div class="domain-functions">
<a onclick="deleteDomain(1)" href="javascript:void(0);">
<img height="24" width="24" alt="48x_delete" src="images/48x_delete.png">
</a>
<a onclick="editDomain(1)" href="javascript:void(0);">
...
What is the meaning of this selector: $("#someID > * *")
I know that > means child nodes and * means all nodes, but I'm confused by the two asterisks. Any ideas?
...
I have the following table. I want to copy Id value on the seleced row to the text box. If I click on link "Select" in the first row the text box value will 0001.
If the table needs modification to get result better and faster, please leave your suggestion.
<div>
<input id="selectedId" type="text" />
</div>
<table cellspa...
var a="##55##data1!!##66##data4545!!##77##data44!!";
how to remove ##664545##data!! from the string
Edit:if we know the start value in a string i.e,##66## and the end value ie,!!
In the main string how to remove characters starting from the start pattern,data after the start pattern till the end pattern
My expected output w...
Is there a way to get work .keypress on a div element like this?:
<html>
<body>
<script type="text/javascript">
<!--
$('#idtext').keypress(function(event) {
var keyCode = event.keyCode;
$('#idtext').text(function(i, text) {
return text + String.fromCharCode(keyCode);
});
});
// -->
</script>
<div id="idtext"></div>
</b...
we're showing a box on the screen that I want to hide when the user clicks anywhere on the screen, including body, anchors, divs, buttons, etc... Is there a selector that can handle this for me? Or is it a case of $('body, a, div, input').click()?
...
Say i have a table row with the two text boxes and i want to manipulate them based on the screens and some array values
<tr id ="myrow" style="display:none">
<td>
test1<input type="text" name="some" value ="some">
test2<input type="text" name="test2" value ="test2">
</td>
</tr>
i a...
<div class="outer">
<div class="inner"></div>
</div>
how do I find the inner div here?
$container.find('.outer .inner')
is just going to look for a div with class="outer inner", is that correct?
so I tried
$container.find('.outer > .inner')
but that doesn't seem to be working.
Edit:
I know its easy to find with something l...
Hello all,
The following doesn't seem to work in IE6. However, it works with IE7+ and firefox. I think I have had a similar issue before where IE6 doesn't like spaces in JQuery selectors. However, I don't know how to re-write this so IE6 will accept it.
$('#other_stages :checkbox:not(#section_2_active, #co_t)').change();
I have also ...
To put it simply:
Is this:
var x = $('#selector-id');
x.slideDown();
Faster than:
var x = $('#selector-id');
$(x).slideDown();
...
this is what the page looks like
<div id="DivID">
<input type="hidden" id="Hidden1" value="Value1" />
<input type="hidden" id="Hidden2" value="Value2" />
<bunch of other tags>
</div>
When I do $("#DivID").find("input#Hidden1").val() I'm getting undefined.
However when I $(":input#Hidden1").val() I'm getting Value1
Invest...
Using jQuery 1.4.2 (IE8 in compatibility mode)
Given the following structure:
<div id='something'>something</div>
<div id='parental'>
<div><p>hi there</p> goats</div>
<p>hello again</p>
</div>
<div> end of the line</div>
and this code:
var Fred= $('#parental');
$('div').css({color: 'blue'});
Fred.children('div').css({color: ...