I am uploading files using SWFUpload. To get the data I need passed along with the file, I am adding post params to swfupload. The problem is that the custom model binder I have written is not called when the controller method is called by swfupload. Some of the properties of my model are set, but not the properties controlled by my c...
HAML:
= link_to 'redeem', redeem_admin_organization_path(organization), :class => 'button_short live redeem'
Controller:
def redeem
@organization = Organization.find(params[:id])
@organization.update_attribute('accumulated_credits', '0')
end
redeem.js.haml:
== $("#organization_#{@organization.id} .redeem").html("#{escape_javas...
hi, i am jquery newbie. and looking for something to do this:
i have a form with hidden input like:
my php get the value 0 for pictures 1 for galleries and 2 for youtube, then process the upload or link in youtube case.
looking how to change between these 3 statements in input value.
this is my prehistoric code: :P
1
2
3
$(...
Hey,
I'm trying to change the id of my elements when I clone an element, basically I keep a counter that I increment and add it at the end of the id each time it's cloned. Seems simple enough.
var addAnswerFlag = true;
function addAnswer(button)
{
//flag to keep clicks from chaining
if(addAnswerFlag)
{
addAnswerFlag...
I'm loading image tags via AJAX and inserting them with the conventional .html(content) function in jQuery alongside a bunch of other HTML. However, this question still applies if you're loading a page from scratch. Now, I have a background image placeholder to be put there while the image loads. I want this background image to go away w...
hi,
i have this code:
<script type="text/javascript">
$(document).ready(function() {
var offset = $("#sidebar").offset();
var sidebar_height = 0;
var stopper = $("#stopper").offset();
var topPadding = 1;
$(window).scroll(function() {
if (sidebar_height==0) sidebar_height = $("#si...
Many times I'm having to loop through data and add the new to the old, but I can never seem to get it right.. Here's what I have now, basically trying to concatinate together the previous number from the new number, ultimately building a comma delimited string of numbers:
function showItems(){
if(prev_numbers == ...
Hello,
My slider seems to be going over the top of the slider container? How can I limit it, or make it move at X px increments?
http://dubcanada.net/play/emma/jquery/index.html
...
I wrote this:
$('[name=item-title]').live('keyup',function(k){
char_limit=parseInt($('[data-charlimit]').attr('data-charlimit'));
total = char_limit-parseInt($(this).val().length);
$('.charcount span').text(char_limit-parseInt($(this).val().length));
});
But after the first few words it starts going super slow where I'll t...
I would like to be able to print a div with overflow:auto by clicking a link. Below is the code I am working with but it dose it on page load...
printMe=window.open();
printMe.document.write($('.terms_and_conditions').html());
printMe.print();
printMe.close();
...
I'm creating a script that allows me to launch pop-in windows based on the URL's hashtag. I'm able to get it to work when the user plugs in the URL+hash directly in the location bar. However, when the anchor links are clicked, the script doesn't seem to perform the .load() function. Is my sequencing wrong, or am I going about this the co...
I am maintaining an ASP.NET site, and I was attempting to get the dialogs looking better using jQuery. The web application has a C# class called MessageBox which allows messages to be shown to the client from the server side.... essentially in the C# on an aspx codebehind if some logic 'does not compute', you can just MessageBox.Show('yo...
Hi.
I hope someone could help me.
When i load an external php that generates a set of fields, i have no problems, but then i send the generated form, i can not access the vars.
There is the code i user:
For load the external file:
$.ajax({
type: "POST",
url: "product-insert.php",
contentType: "application/x-www-for...
Here is my lehmans terms of what i am trying to accomplish.
i will have 3 100x100 px divs, floated left.
<div id="container">
<div id="1">did you know?</div>
<div id="2">help</div>
<div id="3">other</div>
</div>
when you hover or mouse over either of these 3 divs another div will appear via show(); or slideDown(); wit...
Hi,
I am using jquery ui in a rails application. I want to load content of the tab via ajax when the tab is clicked. I have evverything set up correctly, i.e. my controller responds to a xhr request and it simply replaces the content of a certain div (inside the tab content). This all seems to work fine with prototype, however, If I try...
Does anyone know how I can load a Ruby on Rails partial into a jquery dialog? I want to do something like this
$('#advancedExerciseSearchLink').click(function() {
$('#advancedSearch').load('/path/to/advancedsearchform_partial').dialog('show');
}
I could pre-load the partial on the parent page and just show it when the advanced sear...
Hi,
I am working on a form where I need to conditionally set the content inside the facebox modal. I have created a sample code below where on click of each link I need to open a facebox modal(which is getting opened). Now in this modal I am having a textbox. I want the textbox to be filled automatically with the value equals to the tex...
Hi all -
I am using the jQuery validation plugin on my form. I set the basic rules and messages via javascript like this:
rules:{
"billing.firstname":{
required:true
},
messages:{
"billing.firstname":"First name is required."}
I have the additional requirement to use a javascript function to...
Hi there, am trying to use the Jquery accordion to show a list of links generated by wordpress with the wp_list_categories(); function.
This function returns a list of <ul> <li> <a> tags. My problem is that in order to get it working fine, like the second exemple on this page, the heading <a> tags, have to get a special class: <a class...
UPDATED: 06.29.10 Here's the code I'm using so far. I'm really close after searching through the Jquery documentation.
$(document).ready(function(){
//Rollovers for circle buttons
$('img').hover(
function(){
this.src = this.src.replace("_org","_over");
},
function(){
this.src = thi...