I'm working to build a jQuery AutoSuggest plugin, inspired by Apple's spotlight.
Here is the general code:
$(document).ready(function() {
$('#q').bind('keyup', function() {
if( $(this).val().length == 0) {
// Hide the q-suggestions box
$('#q-suggestions').fadeOut();
} else {
// Show the AJAX Spinner
...
The usual way to assign colorbox functionality on a link is like this:
$("a.colorbox").colorbox({ transition: "elastic" });
Newly added itmes are not bound in this way though.
How can I add colorbox to dynamically created <a class="colorbox"></a> elements too?
...
I have an asp.net application and in the UI I have a jquery plugin called growel. When I detect that someone have changed their account (code behind) I need to call the jquery plugin to display but this is on the client side.
But how is this possible, I cant call jquery from code behind code (C#), has anyone a workaround or am i missin...
Here is my code, for some reason it isn't working when I add the easing option.
It works fine with 'fade'.
<script src="jquery.easing.1.3.js" type="text/javascript"></script>
<script src="jquery.cycle.all.min.js" type="text/javascript"></script>
<style>
.pics {
height: 383px;
width: 582px;
padding:...
I am embarking upon my first ASP.NET MVC project and I would like to get some input on possible ways to display database data and general best practice.
In short, the body of my webpage will show data from my database in a table like format, with each table row showing similar data. For example:
Name Age Position D...
I have a list of thumbnails. When I click on a thumbnail, I want the image to load after half a second. Here's my code:
$('ul#thumbs li img').click(function() {
setTimeout(function() {
$('img#image').attr("src", $(this).attr("src").replace("_thumb", ""));
}, 500);
});
When I click on one of the thumbs, nothing happe...
Hi. I'm trying to do a sequential animation with a loop....but i can't accomplish it in a smooth way (some "lag" problems).
jQuery
var i = 0;
var b = 0;
var fades = function(){$(".caja").stop(0).each(function(){
$(this).delay(i * 500).fadeIn('slow', function(){
$(this).delay(5000).fadeOut('slow', function(){
$(".cajar").delay...
Hi,
I try make a multi level accordion with jquery:
HTML
<div class="acordion">
<a href="#"><h1>aaa</h1></a>
<div class="acoTitulo">
<h1>aaa</h1>
<div class="acoSubTitulo">
<a href="#"><h2>bbb</h2></a>
<div class="acoSubSubTitulo">
<h2>bbb</h2>
...
For some weird reason, the codes below are first working, then website is redirecting to the url. I used this code many times before without any problems, please please advise!
<script type="text/javascript">
$(document).ready(function() {
$("[name='submit']").click(function() {
$.ajax({
type: "...
By highlight I mean the thing you do to text when you drag your mouse over it. If you use imgur.com then you know what I want. I can't find anything about this anywhere, it's frustrating. help?
Edit: Okay, I thought I made this clear enough but I guess not. I don't mean I want to change the background color on hover. That's trivial. But...
Why doesn't doesn't the second jQuery-UI dialog box title change when popped. The first dialog box I change the title of the box with using the following .attr("title", "Confirm") -- it change the title of the first box to 'Confirm', like it should have. Now when the second box pops up it should change the title to 'Message' since did th...
I have a table body that grabs it's rows (and form fields) via AJAX on various events. Everything is working fine, except one part: I can't obtain form data from any of the table's rows after it gets manipulated.
I've played around with the live() function, but I can't seem to get the right setup to pull in the form data.
Any ideas?
...
I'm in the process of porting an app to JavaScript/CSS and it uses right-click. For some reason Firefox 3.6 for Windows isn't issuing a right-click event, but Chrome and IE do. Here's some test code. If you right-click #test then you get nothing in Firefox but you get an alert under Chrome and IE.
<html>
<head>
<title>Hi<...
When my member registration form correctly filled in and submitted, server responds with redirect link. But my ajax does not redirect the website. I do not receive any errors, where is my mistake?
<script type="text/javascript">
$(document).ready(function() {
$("[name='submit']").click(function() {
$.ajax({
type: "POST",
...
So on my site, a user can post a comment on 2 things: a user's profile and an app. The code works fine in PHP but we decided to add Ajax to make it more stylish. The comment just fades into the page and works fine.
I decided I wanted to make a function so that I wouldn't have to manage 2 (or more) blocks of codes in different files. Rig...
I'm having a bit of trouble loading pages into an already-existing colorbox.
I have a colorbox opened by clicked a link that is bound by the following code:
$("a.ajaxAddPage").colorbox({
onComplete: function(){
$('ul#addPage li a').click(function() {
$.fn.colorbox({href: $(this).attr('href')});
retu...
I have this php code
$jsonArray = array();
$sql = "SELECT ID,CLIENT FROM PLD_SERVERS";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
$jsonArray[] = array('id'=>$row['ID'],'client'=>$row['CLIENT']);
}
echo json_encode($jsonArray);
And this js
function autosearchLoadServers()
{
$.post("php/autosearch-lo...
I simply cannot get excanvas to work at all. I have tried everything I can think of. I am even uploading the examples that come with excanvas to my website and testing them and they do not even work. I don't know if it has something to do with my server or what, but I haven't seen a working excanvas image yet.
for instance... I this exa...
How can i get the Id of the input field added on the fly?
My script adds the input fields on click on the button , using
var ix = 1;
$(template2(ix++)).appendTo("#dataTable tbody");
var template2 = jQuery.format($("#template2").val());
I also add this , line after the insertion of the new fields, so it adds the typeWatch to all...
I need to get a value from another page. But I get this error with the following code. How can I fix it?
$(document).ready(function() {
$("[name='submit']").click(function() {
$.ajax({
type: "POST",
data: $(".form-signup").serialize(),
url: "external.asp",
...