I am using jQuery. I'd like to get the path of the current URL and assign it to a variable.
Example URL:
http://localhost/menuname.de?foo=bar&number=0"
i have long running task that gets called using jquery ajax. i am using the block ui plugin to show "loading". is there anyway i can send progress messages back to the client to show progress and have that updated on the block ui plugin message.
Dear expert,
I have facing a problem to select span tag using jquery. Please give a solution.
code:
<ul>
<li>
<a href="#Document1">Document 1
<span id="tab_close> x </span>
</a>
</li>
</ul>
hi, i am using thickbox with jquery ui datepicker in one of my asp.net page, the datepicker is not visible , i changed the z index of the datepicker also but nothing is coming out, what should i do
I'm looking for a way to grab the custom attributes of a element with jquery.
<span id='element' data-type='foo' data-sort='bar'></span>
I'm looking to get: `["data-type", "data-sort"]` as an array.
Anyone know how to do this?
Thanks.
I've a table that contains 3 columns. I need to bind an event that fires off whenever one of those columns is clicked using jQuery.
However, I need to know the index of the column clicked.
i.e: First column (index 0), Second column (index 1), Third column (index 2), and so on...
How can I do that?
I am trying to load a file (http://domain.com/v2/inc/review.php) from a subdomain (http://resort.domain.com) using jquery. Although I use the full location it refuses to load.
Does anyone know how to get it to work?
$("#resort").load("http://domain.com/v2/inc/review.php");
I'm having a hell of a time trying to get (what I thought was) a simple index from a collection of multiple sliders. The HTML is as follows:
<div id="left-values" class="line">
<span id="l1" style="padding: 0 1.8em;">0</span>
<span id="l2" style="padding: 0 1.8em;">0</span>
<span id="l3" style="padding: 0 1.8em;">0</span>
<span id="l4" style="padding: 0 1.8em;">0</span>
<span id="l5" style="padding: 0 1.8em;">0</span>
<span id="l6" style="padding: 0 1.8em;">0</span>
<span id="l7" style="padding: 0 1.8em;">0</span>
<span id="l8" style="padding: 0 1.8em;">0</span>
</div>
And the jQuery code is:
// setup audiometry sliders
$("#eq > span").each(function (e) {
// read initial values from markup and remove that
var value = parseInt($(this).text());
// var index = $(this).index; <- this didn't work.
$(this).empty();
$(this).slider({
value: value,
slide: function (event, ui) {
//console.log($(this).attr('id')); <- neither did this.
//console.log(index);
$('#left-values span:first').text(ui.value);
}
})
});
The problem is that jQuery UI - when creating a slider - replaces the existing HTML with its own markup. This includes any ID values and, for whatever reason, I can't get the index for a given slider to surface either. So I'm running out of ideas.
I have a jquery code, but I'm a little bit confused on how can I put a css on this:
$(document).ready(function () {
$('span.account-menu').click(function () {
$('ul.menu').slideToggle('medium');
});
});
I wanted to add this css in the click function.
border: 1px solid #999999;
background-color: #333333;
How can I do that?
I would like to select every div that has a red background color for example.
is this possible in jquery?
<div style="background-color:red"></div>
<div style="background-color:white"></div>
<div style="background-color:red"></div>
<div style="background-color:yellow"></div>
thank you
I know that to filter an element with an atttribute called attrName which has value attrValue I do:
filter("[attrName='attrValue']")
but looking at the docs http://api.jquery.com/category/selectors/ I can't see an option to select all elements s.t. attrNameattrValue
Will this work
filter("[attrName>'attrValue']")
I need to do a custom tree with simple drag and drop functions (mainly for reordering tree nodes)
Coding from scratch, are there any guides/examples out there for getting me jumpstarted?
Oh and using jQuery of course!
hi,
I am creating a line in canvas tag using jquery drawing library. After the line drawn the
<div id="cool"><canvas id="canid"></canvas></div>
Then on click the below code executed.
$('#canid').remove();
What happens in IE after removing, dom with canvas end tag and also line is not removed.
Please help me out!.
On some pages youtube uses "Turn off the lights" feature.
The same can be done in jQuery. Example
The example dims the entire page background but the video player remains on the top. Why is it so?
And what is the simplest way to dim all divs except the video one explicitly?
Say I have a web component that uses jQuery and I want to distribute it as a packaged component.
I need a way to ensure that the jQuery library is available on or after the page loads, but I also want to check that the containing html page, or another unknown component that may reference jQuery hasn't already added the library to the page.
At the moment the best example I've seen is this
http://www.squidoo.com/load-jQuery-dynamically
It would need a little tweaking, but I was wondering if there were any other best practices.
I have this code inside a form of mine:
<textarea>Your message</textarea>
The html content of the tag will be emptied on focus.
I want to run some validation on this field with jQuery. First, the value of this field should not be = "". Secondly, the content of the tag should not be = "Your message".
Anyone knows how I can archive this in the most efficient way?
I'm using jQuery.serialize to retrieve all data fields in a form.
My problem is that it does not retriev checkboxes that is not checked.
It includes this:
<input type="checkbox" id="event_allDay" name="event_allDay" class="checkbox" checked="checked" />
but not this
<input type="checkbox" id="event_allDay" name="event_allDay" class="checkbox" />
How can I get "values" of checkboxes that is not checked?
Is there a way for a jQuery function to "skip" an li? Such as Having 3 list items, you click on the 1st one, it calls a next() function, and skips the 2nd li and goes to the 3rd.
Current code is here:
$('ul.gallery li').click(function() {
$(window).scrollTo($(this).next('li'), 800, {easing:'easeOutCirc', axis:'x', offset:-50 } );
});
I want it to skip the immediate li and go to the one after that.
Why this delay of Jquery animation does not work as it should be?
$(" .inner").stop().delay(1000).animate({height:'142px'},{queue:false, duration:600});
Is there any other way to delay this animation?
Im using a jquery slider and having an issue with what direction it scrolls on click. It seems to screw up after clicking the right arrow then left, but will scroll left if clicked first, weird. Is this a bug or am I missing something here? PS- Im using Chrome (Mac) but seems to behave the same with Firefox and Safari
See example
http://www.warface.co.uk/clients/warface.co.uk/blog/
Please click the red central arrow to reveal the slider.
Many thanks
Rob
I am using Jquery's Just Another Carousel plugin and I'm having issues with something which I am not sure and because of this it's not working. I'm using this plugin because I need fixed height rather than fixed width.
This Doesn't Works (When used Refresh CTRL+F5)
any help?
In the following function it goes through the if and the else, why is that?
function test(){
$(".notEmpty").each(function() {
if($(this).val() === ""){
alert("Empty Fields!!");
return;
}
else{
AddRow_OnButtonClick('tblMedicationDetail',6);
}
});
}
Is there any if and else statement on jquery that I am not aware of?
Thanks
I need to find which event handlers an object has registered.
eg.
$("#el").click(function(){...});
$("#el").mouseover(function(){...});
Is there anyway I can use a function to find out that- $("#el") has click and mouseover registered and possibly iterate over the event handlers.
If not a jQuery Object can we find this on a plain DOM object?