I was wondering if there was any unobtrusive way to hook into methods such as attr, data, css, etc and call custom triggers?
Ideally, I could do something like this:
$(".friend a").bind("attr.changed", changed /* data */, function(e) {
alert("The " + changed.attribute + " attribute changed from " + changed.from + " to " + changed.t...
When embedding a flash object, is there a way to determine when it's fully loaded?
That's my basic question, but for anyone interested in the details behind it:
I am using the (DOMWindow) jQuery plugin. For those not familiar, it's a basic overlay the appears centered on the page, above all other content which is dimmed.
Inside of the...
I have a Windows Forms application in C#/Visual Studio 2008 with an IE WebBrowser control. In the DocumentCompleted event, I want to search the WebBrowser.Document or WebBrowser.DomDocument to see if jQuery is already present in the page.
What's a good way to accomplish this?
Thanks!
...
I am cloning a table row using JQuery and, amongst other things, the row contains a hidden field. I want to change the value of the hidden field when I clone the row.
The form field:
<input type="hidden" name="items.Index" id="items.Index" value="0" />
The JQuery:
var id = document.getElementById("id").value;
var newId = parseInt(id...
I use the following for a jquery link in my <script> tags:
http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
Just wondered if anyone had discovered whether there's a link to the "latest" version:
Something like the following (which doesn't work):
http://ajax.googleapis.com/ajax/libs/jquery/latest/jquery.js
(Obviously not...
I'm using the jQuery autocomplete plugin to get a list of locations, which works fine. But if the user clicks the browser's back button after submitting the page with the autocomplete textbox, the textbox is empty. If I take the autocomplete off the textbox and submit & click back it remembers the text.
Is there a way to stop the auto...
Is there a way to detect a right click followed by paste with JavaScript on IE and Firefox ?
Update:
I decided to use Jquery to do it:
$('#controlId').bind('paste', null, function() {
// code
});
It's not exactly what I was looking (because it gets fired on 'ctrl + v' as well as in 'right click + paste' but I can work around it....
Hello,
I want to find the first span element after class counter, in code something like this:
<div class="counter"></div>
<p></p>
<span></span>
It seems like the next() function only finds the immediate next element, so something like this:
$(".counter").next("span")
Won't work. The way I have been using is a bit lengthy and I wa...
I would like users to be able to double click anywhere on the screen to display a form that allows submission of feedback about that very spot.
I can think of 2 solutions:
Store X,Y coordinates. Had to rule this out since X,Y coordinates aren't supported on all browsers.
Use Jquery to bind an exhaustive list of html entities to a dbl...
How do you copy an event handler from one element to another? For example:
$('#firstEl')
.click(function() {
alert("Handled!");
})
;
// here's where the magic happens
$('#secondEl').click = $('#firstEl').click; // ????
Note that the second element is being processed at a different time to when the first element is ge...
Using jQuery, how would you find elements which have a particular style (eg: float: left), regardless of whether it's an inline style or one defined in a CSS file?
...
I am using jQuery $.load() function to get content from server.
the loaded content contain this:
<p id="p1">123</p>
<script>
$(document).ready(function(){
$('#p1').html('ABC');
alert($('#p1').html());
});
</script>
changing text of paragraph to 'ABC' not affected to page but alert() display 'ABC'.
...
I have some content from server using $.ajax() function. I try to replace some element with this data and then manipulate it. Here is code:
$.ajax({
type: "GET",
url: "smpl.php",
success: function(servmsg){
$('#panelInfo').replaceWith('<p>' + servmsg + '</p>');
}
});
response from server is:
<select id="years">
<option>2008...
I can successfully hide some table cells using jQuery. When I then measure the height of a hidden cell, the space that the cell would occupy if not hidden appears as blank space, pushing all the remaining cells in that row across by one column. It's as if the the cell is reinserted in the table flow, but its content is hidden. The exampl...
I am currently testing this in Mozilla FireFox 3.0.5 using FireBug 1.3.0 with jQuery 1.2.6.
First try
document.getElementById("x").onfocus = function ()
{
var helloWorld = "Hello World";
};
FireBug console:
document.getElementById("helloworld").onfocus.toString() = function body as a string
$("#helloworld").get(0).onfocus.toStr...
I heard that some people where having problems accessing their sites which get their jQuery from Google since their corporate firewall didn't like sites getting code from other sites, i.e. cross-site scripting?
Has anyone run into problem such as this?
...
Is it possible to have an editable div element that can only contain text and images. I understand that you can use the rich controls like TinyMCE and jWYSIWYG however I do not require all this functionality and want something lightweight.
Basically all I want is a plain text editable element where I can also add various images such as...
I am writing an application where by someone can edit paragraphs on a web page. jQuery is used to send and receive the edited paragraph data to a handler, which saves it or reads it from a database. The problem is that if the forms authentication has timed out, I get the login page back from my handler. Is there any way I can detect a...
I have a master/detail setup using jqGrid and jQuery. Is it possible to have the detail grid use a different theme/skin than the master grid?
I see a setting to change the images folder, but it looks to me like grid.css would have to be the same for the entire page. Has anyone tried? Or do you have any suggestions for a workaround?
...
I'm attempting to do something which should be relatively simple. I'm using a ListView to show a number of items, using the ItemTemplate. Inside the ItemTemplate I have a div surrounding the full item, so that I can highlight on a hover event, (being handled already by jQuery).
What I would like to do is have the click event on the di...