jquery

Detecting page refresh and solution for removing data from session info from the db...

I've tried reading the existing posts on this subject, but haven't found a solution that works for me. I'm sure this is a common problem and someone probably has implemented a solution...if so, and you could help me out I would really appreciate it. I have a webapp that needs to execute a logout script when the user either closes the b...

Fluid width Son of Suckerfish dropdown menus

For CSS dropdown menus, I usually stick with the Son of Suckerfish dropdowns. The technique works extremely well, but there's one small thing that's always bothered me: the width of the dropdown links is always fixed. Are there any ways to automatically resize the width of the items in a Suckerfish dropdown menu? If not, are there an...

How to serialize current div by using $(this).parent() with JQuery?

I am trying to serialize the current div by using a clickevent. See code for good explanation: $("#createreview").live('click', function() { alert($(this).parent().serialize()); $.post('/admin/home/review/create/', $(this).parent().serialize(), function(data){ alert('Review succesfully added to database.' +data); }); ...

jQuery: Setting select list 'selected' based on text, failing strangely

I have been using the following code (with jQuery v1.4.2) to set the 'selected' attribute of a select list based on its 'text' description rather than its 'value': $("#my-Select option[text=" + myText +"]").attr("selected","selected") ; This code worked fine, until I noticed one select list on which it failed, depending on the text t...

Calls to update DOM are ignored in Phonegap app with iPhone 3G running iOS 3.0

I am using phonegap/jquery/jqtouch to develop an iPhone app. When testing the app with an iPhone 3G running iOS 3.0.1, jquery calls that make changes to the DOM (such as 'append()') do not work consistently. I have an alert call right before a call to 'append' and have another alert call right after the call to 'append'. Both alerts w...

Styling jQuery Scale Effect

I have a quick question regarding the scale effect... I have a crude animation I am trying to accomplish. I have a quick fadeIn and then list elements scaling and fading out on the screen: jQuery("#page_content").fadeOut(2000, function() { jQuery("#intro_animation").slideDown(2500, function () { var delay_duration = 10; ...

Basic javascript wysiwyg editor

Can I get an explanation on how to make a wysiwyg editor using a textarea? All I need it to be able to do is parse basic html tags like bold, italics, underline, etc. It doesn't need to have any buttons that inserts it, I just want to have a default text inside the textarea tags that parse the html. Example: <textarea cols="20" rows="2...

Resize a chart on parent div resize

Hello everyone, hopefully someone can help me with something that has been bugging me. I've got a page that is based on a fluid grid system. I'm using the gvchart plug-in: http://www.ivellios.toron.pl/technikalia/2010/06/22/gvchart-plugin-jquery-with-google-charts/ to use generate Google charts from a table. Everything works fine except...

Set focus on textfield when un-focused

I want a text field to always be focused. When they click out of the textfield, I want the focus to go back into the textfield. How would I accomplish this with jquery? $('input').focus(); $('input').**unfocused?**( function($) { $('input').focus();} ); ...

Fullcalendar in a new window and adding variables

First great calendar! It's going to save me a lot of time and headaches. I have a couple questions I am populating my calendar using AJAX- and it's working fine.. MySQL gets queried sends back nice JSON-- and et voila-- populates my calendar. The events on my calendar are events logged in by different users (all authentication and asso...

How to simulate the action in a form when submit?

first: always is the same action. two: the form has multiple "CSS SUBMITS" like <form action="/myaction" method="POST"> <a id="foo1" name="foo1" href="#" role="form_button">submit1!</a> <a id="foo2" name="foo2" href="#" role="form_button">submit2!</a> <a id="foo3" name="foo3" href="#" role="form_button">submit3!</a> <input type="submit...

Why isn't z-index working as I'd expect it to here?

A requirement for a current project of mine involves "highlighting" an HTML element in the context of a page. That is, I need to provide some sort of visual effect that decreases the brightness of the surrounding page while leaving the element at full brightness. To achieve this, I'm trying the following approach: Determining the high...

Problems integrating jquery UI datepicker in ajax application

Hello there, I am working on a ajax based application and try to add the jquery datepicker (and its timepicker extension) to a few forms. They provide just the functionality I need. The basic problem I have now is to deal in an environment where the DOM is not complete or better triggered within the application (clicking the edit button...

JSP EL + jQuery "$.ajax()" problem

I have simple JSP: <jsp:directive.attribute name="severity" type="java.lang.String" required="true"/> <jsp:directive.attribute name="currentSeverity" type="java.lang.String" required="true"/> <c:if test="${severity ne currentSeverity}"> <c:url value="/session" var="url"> <c:param name="severity" value="${severity}"/> ...

Remove highlight on jQuery slider control

Does anyone know how to remove the bluish highlight which appears when dragging the jQuery slider control in webkit browsers? It appears to be a dotted highlight box in FireFox, and I'm not sure about IE, but you can view it here: http://www.marioplanet.com/index.asp It's on the top of the left column, and it appears after dragging it...

Form reset causes issues (jQuery)

$(function () { function f1() { if (this.checked) { $('select[name=two]').removeAttr('disabled'); } else { $('select[name=two]').attr('disabled', true); } } $('input[name=one]').change(f1).triggerHandler('change'); $('.reset').click(function () { $('input[name=one]')...

Scroll a list item such that it becomes visible?

Hi, I have a list with a bunch of elements. Usually a scrollbar is required to show them all. I add items to the list at runtime. Is there some way to scroll a particular list element such that it is ensured to be visible?: <ul id='parent'> <li>blah</li> ... <li id='nthItem'>blah</li> </ul> $('#parent').scrollChildToVisible('nth...

.val() doesn't set value for select (jQuery)

$('.reset').click(function () { $('select[name=one]').val(opt2); });​ JSFiddle here. What should I change? Thanks! ...

if statement doesn't work in Jquery Ajax call?

I used if statements before in a the success function of an ajax call but for the life of me I can't get this to work. I can alert all VARS and they show the data, but the condition statement will not work. What am I doing wrong? I just can't get it. jQuery.ajax({ type: "POST", url: "/ajax/uiProcessPhoto...

A very simple Jquery Question (Select multiple id's)

Hi, i am using a jquery plugin and my code look somthing like this. <script type="text/javascript"> $(document).ready(function() { $('#fileUpload').uploadify({ 'uploader': 'img/uploadify.swf', 'script': 'uploadify.php', 'folder': 'upload', 'auto' : 'true', 'cancelImg': 'img/cancel.png', 'fileDes...