Hi Everyone! I have some javascript which runs a timer that animates something on the website.
It all works perfectly but I want to get an image to change when the animation is run, It uses jquery:
if(options.auto && dir=="next" && !clicked)
{
timeout = setTimeout(function(){
if (document.images['bullet1'].src == "img/bulletwhite....
Hi all,
I'm getting users profile pictures from Facebook so their loading time varies quite a lot. When they have loaded I want to resize them. I have the resizing code working OK, but cannot get the actual code to execute reliably at the right time. According to the info I've found this should work:
$('.userPic').load(function () {
....
I have been trying for... about 4 hours now lmao.
currentCalc returns 50
currentSum returns 0 when i alert them. Yet I cannot add them together with parseInt????
what am i doing wrong :'(
var identRow = $('tr.identRow');
identRow.each(function () {
var getIdentClass = $(this).attr('class').split(' ').slice(1);
$('tr.ohp' + get...
Hello all,
I have two elements on the same page that are using the same stylesheet: Jquery Tabs and Jquery Slider.
I cannot redefine classes of slider since change of css will affect both elements.
Tabs using these classes:
ui-tabs ui-widget ui-widget-content ui-corner-all
And these are used in Slider:
ui-slider ui-slider-horizo...
hello,
my main question is as follows: how to show only the first subchild of a ul or li upon clicking the enclosing parent.
eg:
<ul> Grandparent
<li> Child1 <li> Grandchild11</li></li>
<li> Child2 <li>GrandChild21</li><li>grandchild22</li></li>
</ul>
so, for example
I would like something to the effect of
$('ul').click(function...
Hello friends,
I need to get the row count before grid loads.. Based on Row count I need to make some validation to the button. using jquery..
Here is my code using to get the jquery grid row count
var rowCount = $("#Grid").jqGrid('getGridParam', 'records');
if (rowCount < 100) {
$('#btnAll').attr('...
I'm running a weird issue here. I have code that makes jquery ajax calls to a web service and dynamically adds controls using jquery. Everything works fine on my dev machine running IIS 5.1, but not when deployed to IIS 6. I'm using VS2010/ASP.Net 4.0, C#, jQuery 1.4.2 and jQuery UI 1.8.1. I'm using the same browser for each.
It partial...
Given an associative array (of the sort returned by jQuery.serializeArray()) like this:
[
{ 'name': 'abc', 'value': 'aaa', '__proto__': [Object] },
{ 'name': 'def', 'value': 'bbb', '__proto__': [Object] },
{ 'name': 'abc', 'value': 'ccc', '__proto__': [Object] }
]
How can one convert this, using either jQuery or just javascript, to an...
I am getting uncaught exception: Syntax error, unrecognized expression: [@name='rbRewSelectionGroup'] when I load may page which has this in it at the bottom:
<script language="javascript">
$("input[@name='rbRewSelectionGroup']").click(function()
{
...
All,
I have a set of elements like this in a form:
<input type="checkbox" name="chk[140]">
<input type="hidden" value="3" name="ctcount[140]">
<input type="hidden" value="Apples" name="catname[140]">
<input type="checkbox" name="chk[142]">
<input type="hidden" value="20" name="ctcount[142]">
<input type="hidden" value="Bananas" name="...
One of the most convenient things about RJS is its ability to render a partial so you have all your view code in one place:
# task/index.html.erb
<ul id="task_list">
<%= render :partial => 'task', :collection => @tasks %>
</ul>
# task/_task.html.erb
<li>
<% if task.is_completed %>
<%= task.name %> - <%= task.completed_date %>
...
I use jquery.hover to toggle a class when someone mouses over a link. On the iphone when someone taps the link, it toggles the class on, but it doesn't ever toggle the class off until they tap somewhere else.
...
Hi everyone
in this page: http://www.studiokhalid.com/test/jquery/2.html
I am trying to use a simple Jquery Coda slider (that works fine alone) inside the OUTDOOR tab in the Jquery Tools Tabbed Ajax. When I click that tab, it is empty ! while it actually display the Coda slider.
Help is very much appreciated, and thanx.
...
I run the script in IE 8 and get error message after typing in the input field:
//error message from IE8
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2)
Timestamp: Mon, 7 Jun 2010 23:13:10 UTC
Message: Obje...
I am unable to detect when input type="file" changes its value after user selects file and the dialog box closes.
$('.myInput').change(function(){
alert($(this).val());
})
Above jQuery code works perfectly in all browsers apart from IE. For some reason IE detects the change only after input field loses focus.
Is there a way to d...
Hello,
I'm wondering about the clever way to do this...
I have methods that return a value when passed an an object as parameter, such as:
<%= average_rainfall(@location) %>
I'd like to use the exact same methods as a nested resource to call via jQuery/Ajax, like so:
.load('/location/8/average_rainfall')
I understand how to define t...
Hi all, I'm trying to find all the images on a page based on their alignment (no class or id attached to these images), although I'm not sure how to do it. Basically I want to add CSS to images which are aligned to the right, yet leave the other images as they are.
If anyone could help out, that'd be great :)
...
Hello friends using this code I am to get only checked id
the beginForm
I am perfectly getting all my chekced id's to the controler but I need to get both checked as well as uncheked ids' using above code?
thanks
...
I am trying to make an ajax call to a php script. The php script calls an rss feed using curl, gets the data, and returns the data to the funciton.
I keep getting an error
"Warning: Wrong parameter count for curl_error() in" ....
Here is my php code:1
$ch = curl_init() or die(curl_error());
curl_setopt($ch, CURLOPT_URL, $...
I have a text box that I would like to do some validation on. At the moment I have this code:
function updateChanger() {
// Validate input
var likeMessage = validateInput($("#like").val());
alert(likeMessage);
}
function validateInput(input) {
input = input.replace(/[^a-zA-Z0-9:\(\/\)\s\.,!~]/g, "");
return input;...