jquery

jQuery Selector issue finding href with text category1 in it

i have a set of hyperlinks with href = javascript:method('category1') and likewise category2 category3 ... I want to select hyperlink with href containing category1 so i have written jQuery(a[href*='category1']) but dont know why it also selects hyperlinks with category10 category11 category12 ... also I understand that category1 is...

jQuery Horizontal scroll with unknown width of items

I am creating a gallery using jQuery which displays pictures horizontally, with a "left" and "right" button below, that scrolls the row of images. There are plenty of tutorials and plugins for this. The problem for me though, is that 1) I don't know the width of the images. And 2) I need the item I scroll to, to be centered. How do I g...

In jquery Set a delay to fade out or fadeout right away on click

I am trying to right a script for a notification popup. I wan't the popup to fade out after X seconds or fadeout when the user clicks on the message. I can get both effects to work individually but when I try to combine them fadeOut works. This is my code so far: function notify(data, type) { switch(type) { case "success": $('#notif...

Issue with changing an attribute with jquery

Hello, I'm having an issue with changing the attribute for an id and can't seem to figure out what I'm doing wrong. I guess it doesn't help that I'm new to this also. I have a function that tests to make sure that I am pulling the correct id from the row in my form that I have dynamically created. It goes something like this: myFunctio...

Jquery UI : date picker. How to set date in date picker by $_GET

Hello, I can't find how I can set $_GET variables to set manually the date in the date picker. http://jqueryui.com/demos/datepicker/ ( example : http://www.something.com/?day=21&month=2&year=2010 ) Is that possible ? Thanks ...

jQuery.clone() IE problem

I'm have some that uses jQuery.clone() to get the html of a page and then add it to a pre tag. It works correctly in Firefox and Chrome, but nothing happens in IE: <!DOCTYPE html> <html> <head> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; <meta charset=utf-8 /> <title>JS Bin<...

When creating an event from 12:00am to 12:30am it shows up as all day event

However if I change the time to 12:00am to 1:00am, it renders in the time slot and not as an all day event? Not sure whats going on! $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); $query = "select id,class_name,bridge,start_time,end_time from $table"; $results= mysql_que...

Shadowbox doesn't works when it's placed inside of a jQuery ".html" function.

Well, I'm placing a link inside of a div called "alerta" with jQuery function ".html". Ok, then I tried to place the "rel='shadowbox'" parameter inside of my "a" tag and it doesn't works. $('#alerta').html('<a href="selecao.php?id=' + avisos[i+1] + '" rel="shadowbox">' + avisos[i] + '</a>'); If the link is place...

What is the syntax for a checked checkbox in HTML?

Sounds like a bit of a silly question, but I am wondering what is the best way of stating that a checkbox is checked/unchecked in HTML. I have seen many different examples: <input type="checkbox" checked="checked" /> <input type="checkbox" /> <input type="checkbox" checked="yes" /> <input type="checkbox" checked="no" /> <input type=...

jQuery: Using normal function value as jquery value

Essentially i'm trying to get the value 'col' that is set in the html, and use it as the value for backgroundColor. Here's the script: function bgc(col) { $("#BG") .animate({ backgroundColor: "col" }, 1000) } Here's the html: <div id="BG"> <a href="#" onclick="bgc(#ffffff);"></a> </div> Any help would be great, i've be...

JQuery BlockUI blocking message does not immediately show

I have the following code an .net mvc aspx page ... ////////////////////// $.blockUI({ message: 'Processing ... Please Wait' }); var registerOk = registerNewUser(); var createUserSubscriptionOK = createUserSubscription(); $.unblockUI(); \\\\\\\\\\\\ The block message does not show until just around the time that the 2nd function f...

jQuery to select where no children or first child is not image

I'm trying to dynamically style some elements on my pages. So, if I had the following code: <a href="#"> Select Me </a> <a href="#"> <img src="blah.jpg" /> Don't select me </a> <a href="#"> <div>Don't select me either</div> <img src="blah.jpg" /> </a> <a href="#"> <div>You can select me too.</div> </a> I would like it to...

jQuery: Disable all links within a div - replace with inner content

I want to disable all links within a div and replace it with the content that was there. i.e. <div><a href="/blah.html">My super link</a></div> to <div>My super link</div> Thanks ...

How to check if selected index of dropdownlist is not 0 or -1 using jquery.

Greetings, How to check if selected index of dropdownlist is not 0 or -1 using jquery? ...

jQuery way to handle select lists, radio buttons and checkboxes

When I handle HTML form elements with jQuery, I always end up with an ugly mix of jQuery syntax and plain JavaScript like, e.g.: function doStuff($combo){ if( $combo.get(0).options[$combo.get(0).selectedIndex].value=="" ){ var txt = ""; }else{ var txt = $combo.get(0).options[$combo.get(0).selectedIndex].text; ...

Overriding check box in JavaScript with jQuery

Help with unit testing checkbox behavior. I have this page: <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(function() { $('<div><input type="checkbox" name="makeHidden" id="makeHidden" checked="checke...

How do I parse this invalid JSON string in jQuery?

Hi, I am looking to access the various bits of data in this data attribute: <div class="location" data="{id: 4, point: {lng: -71.413364, lat: 41.673681}, category: 'Restaurant'}"> The data attribute is easy enough to reach in jQuery, of course. But the string seems to be a non-standard or invalid form of JSON. I've tried JSON.pars...

Looking for examples of well-architected Rails/Javascript/AJAX apps

I feel like each time I start a new Javascript-heavy application, I begin to bumble around more and more as additional client-side code is written. The code structure of a Rails app is pretty well dictated by the framework, but developers usually invent their own structure for their Javascript and AJAX interactions. I'm looking for web ...

Nothing happen on setting minDate in jquery datepicker?

Hey Guys, I written like this.. <script> $(function() { $('#from').datepicker({ defaultDate: "+5d", changeMonth: true, numberOfMonths:1 , minDate:"+0d", dateFormat: 'DD, MM d, y...

jQuery::List of image elements. Trying to make them into a slideshow

I managed to design a small 4x4 grid filled with images. Currently, I am styling the ul element using jQuery. <ul id="imagegrid"> <li> <img src="..."> </li> <li> <img src="..."> </li> </ul> So, when I click an element inside this list it just zooms up and shows as a larger image. Now, if I want to simulate a slideshow,...