jquery

jQuery.attr function

i am using $('<div/>').attr('font-weight','bold'); It is not applying font-weight to bold with above function. Is there something wrong in there? ...

using jquery vs php to reduce load

Hi I'm setting up a registration page, and I'm using PHP primarily to verify the data. I've realized that using a client-driven language for some of the validation will reduce the workload from the server. I don't have much knowledge in jquery, but I'm looking for code that will determine the correct syntax of an email (ex, one '@' and...

JQuery - Fade In Background image

Hello, I have a web page that uses a large image for its background. I was hoping to use JQuery to load the image once it is downloaded (basically the way that bing.com loads it background image). Is this possible with JQuery? If so, is their a plugin that you would recommend? I apologize for being so vague, but I'm a little lost on thi...

how to set radiobutton in jquery

I have radio buttons like this <td> <input id="radio1" type="radio" name="correctAnswer" value="1">1</input> <input id="radio2" type="radio" name="correctAnswer" value="2">2</input> <input id="radio3" type="radio" name="correctAnswer" value="3">3</input> <input id="radio4" type="radio" name="correctAnswer" value="4">4</i...

Turning a complex jquery css selector into a context for caching

After feedback, complete rewrite of the question. I have the following mark up : <body> <h1>Title</h1> <p>bla</p> <div> ... <!-- a thousand tags --> </div> <div id="do-not-modify-me"> <!-- a hundred tags --> </div> </body> I can access to : <h1>Title</h1> <p>bla</p> <div> ... <!-- a thousand tags --> ...

form wont submit with jquery form submit when some fields are disabled

I am submitting a form via jquery form submit. just like this example However, I have given the user an option to disable some fields on the form. I am using following jquery code to do this: $('#onlyTwo').click(function(){ var stuff = $("#textarea3, #textarea4, #radio3, #radio4, #onlyThree"); if($(this).is(":checke...

<optgroup> in Opera using jQuery

I'm having an issue with <optgroup> in Opera using jQuery. First, here's the code: // returns a jQuery optgroup object function getSpaceOptGroup(locationName) { var location = locations.first(function(l) { return l.name == locationName; }); var optGroup = $("<optgroup label='" + location.name + "'></optgroup>"); ...

jquery synchron fadeout and fadeto with differnt elements

Hello everyone, i try to get a solution for following problem. synchron fadeout and fadeTo with different elements. the page behavior should be like this - page load - content hidden - menu shown - content fadeIn and menu fadeTo opacity 0.0 my snippset of code $(document).ready(function(){ $(".content_main").hide(); $("....

Jquery ajaxForm beforeSubmit fires on document.ready

Hi, i have the following code: $("#forma_mod_uid").livequery( function (){ $("#forma_mod_uid").ajaxForm({ beforeSubmit: mcargando("#cargando2"), target:'#mod_2', success: ocargando("#cargando2") }) }); the mcargando passes the div wich will contain a spinner img, and then o...

Selecting only first-level elements in jquery

How can I select the link elements of only the parent <ul> from a list like this? <ul> <li><a href="#">Link</a></li> <li><a href="#">Link</a> <ul> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> </ul> </li> <li>...

jQuery change() problem

I have the following code: $('.groupselect').livequery(function(){ $('.groupselect').unbind().change(function(){ _this = this; _id = $(_this).attr('id'); //alert($(_this).val()); alert($(_this).attr('id')); }); }); I can take the value from the element, but i cant take the value from the id at...

How to execute javascript inside a script tag returned by an ajax response

I'm sending a jquery get request like so: $.get($(this).attr("href"), $(this).serialize(), null, "script"); The response I expect to receive will be wrapped in script tags. I understand the browser doesn't execute the response unless its returned without the script tags. Normally I would remove the tags from the response but in this ...

Implementing an animated ValidationSummary with ASP.Net and jQuery

I'm just getting started with jQuery, and one of the things I want to do is build a slicker ValidationSummary for WebForms. I envision something like StackOverflow's notification system, where when you log in after awhile an area at the top of the screen animates down and maybe lets you know that you've got a new badge. If you click the...

How can I fire functions once an image has been loaded using jQuery?

I am writing a simple image replacement script on a site I am working on and having a bit of trouble. The code I have at the moment consists of: $(function() { // When a thumbnail is clicked $(".zoom_thumbs a").click(function() { // Get large image attributes var largeImg = $(this).attr("href"); var largeTitle = $(thi...

Update dynamic html attribute

What im trying to do is when the p inherits the class "active" that div.test will print the link rel correctly. Currently if the page loads without the class assigned to the p tag, it will not. How can I make it happen when the p tag inherits the class "active" the link printed in div.test will get the rel printed correctly? $(documen...

Moving focus when opening a panel using JQuery

on the following site i have two hidden panels labelled "show map" and "show floor plans". When the the header of each is clicked the slide panel is opened. The floor plans is long and thus will go below the page view. is there anyway to keep focus at the bottom of the panel, so that when it's clicked you manage to see the whole windo...

jQuery append fadeIn

Similar to: http://stackoverflow.com/questions/327682/using-fadein-and-append But the solutions there aren't working for me. I'm trying: $('#thumbnails').append('<li><img src="/photos/t/'+data.filename+'"/></li>').hide().fadeIn(2000); But then the whole list fades in at once, not as each item is added. It looks like hide() and fadeI...

jQuery CDATA parsing

Hey, solution (stupid!): The XML wasn't valid.. I forgot a /. Although I validated it earlier in w3schools, I added one tag and didn't close it properly. original: I'm parsing an xml file with jQuery. In one node I store a JavaScript function with CDATA: <action is="javascript"><![CDATA[ alert("Holy Crap!"); ]]> </action> now I craw...

question about jQuery ajax form plugin

I am using jQuery Form Plugin It is working fine as I have it now. I want to add some functionality. After the form submits the plugin is returning back responseText (see above link). I am updating one div with this link. What If I want to update multiple div's...with different messages. Basically, I'm wondering if there is a way ...

is there an easy way to convert jquery code to javascript?

hopefully the question doesn't sound stupid, but there are lots of examples out there of achieving certain things in javascript/dom using jQuery. Using jQuery is not always an option (or even a want) which can make understanding the examples of javascript solutions written in jQuery hard. Is there an easy way to convert jQuery code to r...