I'm looking at the example for the "click" event in the jQuery documentation here. I can refactor the two anonymous functions as follows and it still works:
$(document).ready(function(){
$("p").hover(hilite, remove_hilite);
});
function hilite()
{
$(this).addClass("hilite");
}
function remove_hilite()
{
$(this)...
Is it possible to open a jQuery UI Dialog without a title bar?
Thanks!
...
ive tried this but wont work.
$(function() {
$('input[type=text]').focus(function() {
$(this).val() == '';
});
});
...
I have the following:
<ul id="list">
<li>item1
<ul>
<li>sub1</li>
<li>sub2</li>
</ul>
</li>
</ul>
I'd like to respond to a li click event and use the text of the li elsewhere. However, if the click is on an li that contains a nested ul, I of course get the text of all elements.
$("#list li").click(function() {
...
IE is having diffculty with dynamic urls in the jQuery load function.
Here's my code snippet:
var formValues = $('#testing').serialize();
var URL = "test.cfm?" + formValues;
var dialogOpts = {
modal: true,
bgiframe: true,
autoOpen: true,
height: 500,
width: 500,
draggable: true,
resizable: false,
...
After some struggle, I got upto the following code for my problem. However it still does not add selected to a chosen option. You can find my original question below.
Improved code, but it still does not work.
var $index = $('.drop').index(this)
// find drop index...
var $indexofmonth = $index + 1;
//alert($indexofmonth); // this works
...
What is the best way to get the full String representation of an HTMLCollection object in javascript/jquery? The output String should have an XML syntax.
...
I am looking for a mature framework that can do Javascript mocking, especially on AJAX and JSON area.
Is there any existing mocking framework for Javascript ( and/ or JQuery) that you are used and can recommend?
Edit: I have evaluated jqmock and jqunit. It seems that it's the only framework that can do basic library mocking and stubbin...
hi all
i am not familiar to jquery .i want to get id of controls i have in datalist so that i use them in jquery ,,plz help
thnx in advance
...
here is the test page
http://www.studioteknik.com/html/test-portfolio.html
I got no error, but no hover-slide effect...
any clue anyone ?
Update, molf have fix the problem, that was the absolute position that did the trick.. but, now, when the text show up, the link underneath is NOT CLIKABLE
the corrected page is here : http://...
There is an undefined error due Ajax request in jQuery. But it works locally. Error referencing in jquery1.3.2.js @ 3633 line
xhr.send(s.data);
My code is:
$.ajax({
type: "POST",
url: 'index.php',
data: "action=showpath&type=images&path=&default=1",
cache: false,
dataType: "html",
success: function(data){
$('#addr').h...
I've got this script on my website:
$(document).ready(function() {
function filterPath(string) {
return string
.replace(/^\//,'')
.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
.replace(/\/$/,'');
}
$('[href*=#]').each(function() {
if ( (filterPath(location.pathname) == filterPath(this.pathname))
&&...
I've several
<div class="sidebar"></div><div class="content"></div>
The backgrounds of the sidebar and content are different. So, if they are not equal of height, the page behind shows up. I want to equal their heights using jQuery. I've tried it myself, but failed.
Note:
The sidebar and the content is a pair. So,
$('.sidebar').hei...
Hi there, I'm trying to fire a function when the "keyup" event happens. This works fine when I'm testing it on normal textarea's and input fields, however, when I use the same code on the tinyMCE editor, nothing happens. I suspect it is because the tinyMCE is running on java, and already has event listeners in place, however my java know...
Hi,
I am using the ajax uploader
and the Zend Framework.
The Problem is when I am using the json response for the onSubmit.
With $this->getHelper('Json')->sendJson($data);
I only get a saveas dialog.
The problem is that the uploader expects every responste to be "text/html" but the json helper sends "application/json" as mimetype.
Wi...
I am importing a feed into Tumblr and because of the formatting of the site, it shows too many pictures. So to fix that, I thought I would use jquery to remove extra elements.
It turns out that the imported feed uses tables. No worries, I made a jquery call that seemed to work fine on an individual post.
(Pardon the ugly match)
$('....
Hello, I am building a "universal wrapper" for several different external sites that would build a nav and footer with jquery and xml.
My problem: Since the script will be used on multiple sites that were built by other people, I need to build a container out just inside the opening and closing body tags. I have been able to target t...
I would like to have two things happen at once when I click on a link. I am slowly going through Jquery documentation, but have yet to learn what I need yet.
Here is a link to my site
When I click on the services link I would Like the #slideshow div to hide, and a new div to replace it.
I had tried to just have the slideshow animate...
I need to create a new application in which the UI designer decided to heavily use drag and drop. Some of the drag and drop functionality would be:
Moving items within a list
Moving items to a trash can to delete them
Possibly letting users have a "My Page" where users would use widgets to create a personalized page
As soon as the us...
I have a web form that contains lots of JavaScript functionalities to manipulate the DOM.
This is achieved using AJAX to call a service that will return me whatever I have to do, such as hiding elements, cascading drop downs, removing and inserting new items to a select, etc.
Everything works as expected apart from one particular functi...