jquery

<input type="password" ...> styling with jQuery

Hi all! Is this possible to change the default styling of password field? I mean replacing the default stars-symbols with something like &bull; or etc. jQuery or simply css/html? Thanx. ...

Pass variable to external JS file?

Hi SO: Is it possible to pass a variable to a linked .js file? I tried this: <sf:JsFileLink ID="JQueryLoader" runat="server" ScriptType="Custom" FileName="~/Files/Scripts/rotatorLoader.js?timeout=1000" /> But firebug is telling me that timeout is not defined. Here is the code for that .js file: $(document).ready(function() { $("...

Trouble with jQuery Animation

I'm fairly new to jQuery and I'm having trouble with an animation that I'd like to do. Say I have some drops downs to filter content that use this HTML: <table class="calFilter"> <tr> <th> <label for="ddlDept">Show events hosted by:</label> </th> <th> <label for="ddlEventType">Select event type:</label> ...

jQuery.get() Help

What's wrong with this function: function() { $.get('/controller/action', function(data) { $('#temporaryPhotos').text(data); } ); return false; } What it should do is fetch HTML from /controller/action page and insert the HTML into the #temporaryPhotos div on the current page. Initial markup looks like this: <div...

JQuery live or something similar with .change() ?

I want to do this: http://docs.jquery.com/Events/live#typefn Only .live() doesn't support the change event- any ideas for work arounds? Need to bind a function to some on-the-fly DOM elements, but not until change. ...

Ajax Call to Monorail Controller JQuery

I could really use an example of this. Can anyone provide me with a sample implementation of a Javascript function using JQuery (not totally necessary) to make a Castle Monorail call? I have Monorail configured to intercept all HttpRequests with "*.ashx". Using an Ajax call I would like to pass a parameter to my Monorail Controller and ...

How can I use jQuery.load to replace a div including the div

I have a div with the id of "secondHeader" and I want to replace that entire div with another div with the same id of "secondHeader" but instead of replacing it , it just adds the loaded div inside the first one. $("#secondHeader").load("/logged-in-content.html #secondHeader"); This is what happens... <div id="secondHeader"><div id=...

Ajax returned text read differently by Firefox and IE

I am returning a json object that Firefox reads correctly but IE doesnt. for example: if( data.returnedText=="OptionA"){... this is true as it should be in Firefox, but IE doesnt match. ...

jQuery Error IE JSON

Hi, when I run this JS in FF or Safari it works just right but in IE I get 'optionValue' is Null or not an Object. $(function() { $('#selectBrand').change(function(){ $.getJSON('Scripts/ajax_busquedas.php', {idMarca : $(this).val() }, function(j) { var options = ''; var i = ''; for (i = 0; i < j.length; i++) ...

jQuery Validation - Moving JS to External File and Passing Fields

I am trying to clean up some of the JavaScript throughout my views and one of the things I would like to do is move my jQuery Validation code to an external script function and pass in references to the fields I need to process/validate. The issue I am facing is pertaining to how the signature of jQuery Validate's rules field is formatte...

jQuery ajax() vs get()/post()

Let's say I want to execute a PHP script. Which way is better? This: $.ajax({ type: "GET", url: "php-script.php", dataType: "script" }); Or this: $.get("php-script.php", function(data) { }); ...

How can I use django with JSONP to load content from my other website?

I have two sites written with Django. What I want is to load a content from one site into another. I found out that best choice to do this would be using .getJSON and JSON-P but I have no idea how to put this things (Django, jQuery and JSONP) together. Any help from more expirienced users? EDIT I'm trying to achive an ongoing process ...

jQuery Selection Problem

In the following code, how do I select all the <tr> elements that have a <td> with an image that ends in cancelled.png? I am at a loss... <table> <tr> <----- select this whole tr <td> <img src="/images/icons/invoice-cancelled.png" alt="cancelled" /> <a href='/orders/invoice.aspx?invoiceid=63'>X1087</a...

Having trouble rendering Javascript in Rails

Here's the relevant controller code: if @song.update_attributes(params[:song]) respond_to do |format| format.js { render :action => 'success' } end else Here's what's in success.js.erb: $("#song_updated_at").val( "<%= escape_javascript @song.updated_at %>" ) Here's the error I get: ActionView::TemplateError ($_ v...

using jquery to create div with a button and then capture the new button's click event?

I want to use jQuery to create a new div on the page when a certain link's click event is activated. I know this part will be fine. The part I am concerned about is this: if inside of the newly created div is another link, will I then be able to use jQuery to capture the click event of this new link? I.e. will the javascript be able to...

Jquery toggle function breaks on pages that include mootools or slimbox script.

My friend is asked me to look over her site where there is an error on pages that use slimbox-- an unrelated Jquery toggle function breaks— here's the code: $(function() { $(".cat_nav dd").hide(); $(".cat_nav dt").click(function() { $(this).next().toggle(); return false; }); }); This code works fine when slimbox ...

Problem using jquery UI droppable and livequery!

I have this code for some elements to be dropped var $tab_items = $("ul:first li",$tabs).droppable{ tolerance: 'touch' ,.... and it´s work ok, but the problem it´s when I load another button by ajax or by javascript, don´t work because the new element don´t have binding for this event. In other similar situation I found a solution usi...

Jquery CheckBox

var $field = $(this); if ($field.is('input')) { alert(1); if ($field.attr('type') == 'checkbox') { alert(2); if ($field.attr('value') == "true") return $field.attr('checked'); } return $field.val();...

jQuery $.getJSON works only once for each control. Doesn't reach the server again.

First my code $.getJSON("./posts/vote/" + postId + "/1", null, function(result) { if (result.result == true) $("#pst" + postId + " > .pstside > .rank > .score").html(result.voteCount); }); I have a bunch of buttons each with code which brings some voting results from an ASP.Net MVC controller action. This works well the fir...

How to find the div before a specified element with jQuery?

<td> <div class="resumehint"></div> <input type="file" id="resume" /> </td> How to get the div before "#resume" with jQuery? That is ".resumehint" ...