I am using the jquery $.Ajax property for getting some data from database as json and manipulating dom with that.
For example like this:
$.ajax({
type: "POST",
url: "TipsAndTricksService.asmx/postCommentForTT",
data: "{'ttID':'" + ttID + "','text':'" + answerText + "','authorOfTT':'" + authorOfTT + "'}",
contentType: "applicati...
I'm trying to find the jQuery equivalent of this JavaScript method call:
document.addEventListener('click', select_element, true);
I've gotten as far as:
$(document).click(select_element);
but that doesn't achieve the same result, as the last parameter of the JavaScript method - a boolean that indicates whether the event handler sh...
I've done my homework - I swear, I've been researching this for a bit.
I have found two nice options, each with its own particular problem:
Option #1: "Supersized" @ http://buildinternet.com/project/supersized/
The problem is that the images become stretched to essentially become the background-image.
I want the images to stay within ...
I'm working on a project that approximates the functionality of Firebug's inspector tool. That is, when mousing over elements on the page, I'd like to highlight them (by changing their background color), and when they're clicked, I'd like to execute a function that builds a CSS selector that can be used to identify them.
However, I've b...
I'm able to resize the height with the $.fancybox.resize(); part, but the width just doesn't update according to the new content. Thoughts?
...
I would like to use $.ajax() to request a page, but load only fragments of that page. I know you can specify what page fragments you want with .load() but I was wondering if this is possible with $.ajax?
...
Hi,
Inside a tab, I have a form that is dynamically loaded via ajax. Since the name of the field is dynamic too(e.g. <input name='title1' id='title1', class='tRequired'>), I write a custom validation method inside the "on complete" like this. However, the custom code does not get executed (the alert never pops up) no matter what i try.
...
I made a sortable list:
<ul>
<li class="line"><a href="#" class="food">milk</a></li>
<li class="line"><a href="#" class="food">eggs</a></li>
<li class="line"><a href="#" class="food">cheese</a></li>
</ul>
However, I want to make everything with class food not draggable. Since they are links, sometimes when people click them, ...
I'm building an in-browser IDE using Javascript. The code/widgets are stored in the document. I want control over the editing process so I am intercepting keystrokes and displaying a simulated cursor where the edit point is in the DOM. (At first I tried using contenteditable = true but that isn't giving me enough control.)
I've made s...
I'm working on a sort of proof-of-concept for a project that approximates Firebug's inspector tool. For more details, please see this related question.
Here is the example page. I've only tested it in Firefox:
http://troy.onespot.com/static/highlight.html
The idea is that, when you're mousing over any element that can contain text, it...
Hi,
i get the webpage content from an external website using ajax but now i want a function which extract a specific input field value which is already autofilled.
the webpage content is like this:
.........
<input name="fullname" id="fullname" size="20" value="David Smith" type="text">
<input name="age" id="age" size="2" value="32" ty...
I do not know javascript right now but I am planning on learning it. My question is do I need to have a good understanding of javascript in order to use jquery? I already know actionscript and php which are quite similar. Should I study javascript before learning jquery?
...
Does anyone know a good way to test if one element, stored in a var, is the child of another, also stored in a var?
I don't need element1.isChildOf('selector'), that's easy.
I need element1.isChildOf(element2)
element2.find(element1).size() > 0 Does not seem to work.
I don't want to have to write a plugin the uses .each to test each c...
*Nevermind. I figured it out. *
I did it like this:
$("#accordion").accordion({
header:'h3',
active: '#section1',
autoheight: false,
clearstyle: true,
}).bind("change.ui-accordion", function(event,ui) {
$("#text1").focus();
});
I've got an accordion all set up, and each div has a form within it. ...
</tr>
for ($i = 0; $i < $dm_numrec; $i++) {
?>
<tr>
<td width="266" height="28" valign="top">
<input type="text" name="recommend_to_name<?php echo $i;?>" />
</td>
<td height="28" valign="top">
<input type="text" name="recommend_to_email<?php echo $i;?> />"
...
Hi,
I want to extract the source code of a webpage which is hosted by other website, but the problem is that O get an empty response, I tried to pull the source of multiple websites but the problem is from my code:
$(document).ready(function(){
$.get('http://www.xxxx.com', function(xdata) {
alert("content: "+xdata);
});...
Hi,
To give a simplified example, I've got the following block repeated on the page lots of times (it's dynamically generated):
<div class="box">
<div class="something1"></div>
<div class="something2">
<a class="mylink">My link</a>
</div>
</div>
When clicked, I can get to the parent of the link with:
$(".mylink").clic...
how to hide load url in jquery?i want to hide pmscount.php
{
$('#notification').load('pmscount.php').fadeIn("slow");
}, 10000);
...
Hey Guys,
I'm having a little trouble setting up jCarousel -
www.lovejungle.com/store
Basically I want it to look like the slide show on www.ripcurl.com.au/?home
I've got as far as implementing the jCarousel - But the configuration and navigation buttons arn't right.
AS you will see jCarousel starts on the first image, but then s...
A sample of the HTML snippet is here:
<select name="paytitle" id="paytitle">
<option value="Budget Keeper" selected>Budget Keeper</option>
<option value="Bookkeeper">Bookkeeper</option>
<option value="Treasurer">Treasurer</option>
<option value="Accounts Payable">Accounts Payable</option>
<option value="Other">Other<...