jquery

JQuery Flickr API

Hi All! I am writing a script using jQuery and Flickr REST API. Now the problem statement: following the the pseudo algo hit Flickr API and get a list of photos using $.getJSON nad create li list elements create_gallery: function(){ $.getJSON( $.prep_api_url(), function(data){ $.each(data.photos.phot...

JQuery: table parser and CSS change

I have a table in the following format: <table id="searchResultTable"> <tr> <th>List</th> </tr> <tr onMouseOver="activeTr(this)" onMouseOut="inactiveTr(this)" onClick="showDetails(TODO)"> <td><a href="javascript: void(0)">AAA</a></td> </tr> <tr onMouseOver="activeTr(this)" onMouseOut="inactiveTr(this)" onClick="showDetail...

If input2 empty copy value from input1?

Hello everyone! This is my first message here so I hope that newbies also get help :) My problem is following: let's start with code first.... javascript: $(document).ready(function(){ if ($("input#datum2").val() == "") { $().click(function(){ $("input#datum2").val($("input#datum1").val()); }); } ...

Jquery Parents not working for multiple divs

I am trying to hide the parent div of a table of all the checkbox are unchecked in the table My jquery looks like $('table.result_grid tbody') .filter(function() { allChecked = false; $(this).find(':checkbox') .each(function(index) { allChecked = allChecked || $(this...

jQuery append child nodes in for each

In the below code I'm trying to loop through each child node and append the child to another element - what is the correct syntax inside the loop? $(this).children().each( $(div).appendChild(this.childNodes.length - 1); ); ...

Should I continue using Mootools now that MS is backing up JQuery?

I've been using Mootools for the last couple of months without knowing that MS was including JQuery with their new releases (like MVC). Now I'm not sure if I should switch to JQuery considering that I will be developing on MS tools and frameworks for the next years. I would like to hear from more experienced developers. Thanks! ...

What CSS/Script is stopping "bgiframe" from working in IE6 on this page?

Hi, Does anyone have the expertise to quickly figure out why jquery bgiframe's plugin is not working on this page? The code is basically the exact code from the dialog plugin demo page. http://webdev.peelregion.ca/health/destinationparenthood/template.htm Our site template seems to not play well and I am trying to determine what exact...

How to remove animation for this jQuery modal plugin?

How can I remove the animation from this jQuery modal window? You can see the example of the plugin here: link text ...

Check for Background in CSS

I have a number of CSS attributes and Classes which get applied based on where the element appears in the HTML. However some elements do not equal any of these values so i want to be able to check which elements in a DIV do not have a background set via CSS then apply a background. Something like: $('.divclass:has('background')').addC...

Detect when a specific image has finished loading

I have an image on a webpage which is being dynamically generated by a server-side CGI program. Periodically this image is refreshed by a timer and/or changed based on user input. So I have a Javascript function like // <img id="screen" src=""> is elsewhere in the page function reloadImage() { $("#screen").attr("src", make_cgi_url...

Is it ok to use google.setOnLoadCallback multiple times?

I'm building a site using ASP.NET MVC, and I have partial views that use jquery to do various things. I was thinking of switching to google's ajax api and using their loader to load jquery. However, I noticed that I would no longer be able to use $(document).ready() anymore because google's loader specifies a callback google.setOnLoadC...

jQuery Validation -- Not validating

I am building my first ASP.net MVC application (not my first jQuery & jQuery Validation plugin application), and I am having a terrible time performing the client side validation with the validation plugin. Does anyone know if there is a problem using the plugin with jQuery-1.3.2.min that comes with VS 2008? My code is as follows: v...

window.print IE6 and jQuery

For some reason, in Internet Explorer 6, I cannot get window.print(); to actually work within jQuery. Any ideas why this isnt working? <script> $(document).ready(function(){ function print() { window.print(); return false; } $("a#test").click(function() { print(); }); }); </script> Here is my jsbin: http://jsbin.com/...

Does the browser "cache" javascript code?

I was fine tuning a page that is heavy on jquery and stumbled across this website: http://www.componenthouse.com/extra/jquery-analysis.html When I click on the "Run Test" button the first time, the numbers are way higher than subsequent clicks. Is this because JS is cached by the browser? Can someone explain how this works internally? ...

Creating a Scroll Follow function but need to prevent it from overlapping the Footer Div

I've created a function that changes the 'position' of a DIV to 'fixed' after a certain point of scroll. The purpose is to keep it visible on the screen while page is scrolled. Works great (although not in IE6). Problem is that when I get to the bottom of a page, I don't want the DIV to overlap the footer. I'm guessing I'll need to c...

select loses focus when mouse is over options

I am trying to do a hover effect as follows: <div>Some Text</div> should be substituted by a <select> upon mouseover. as soon as the mouse leaves that select it should display either the value previously displayed or the new selected value. Unfortunately the mouseleave is called when you open the dropdown to select some options and I...

JQuery: how to select parent table for parsing

I have JS function which parses through a table: // id contains a message id, activeRow is "this" from onClick on tr function doSomething ( id, activeRow ) { // AJAX calling using id as parameter $("#searchResultTable > tbody > tr").each(function(index) { $(this).removeClass("bold"); }); } This works perfectly fine...

How do I write json results to a div using jquery?

This is probably a really easy question, but I can't find anything that works. I'm trying to take a json result and just write it into the inner html of a div to see what it looks like. I have something like this: $.getJSON("someurlthatgivesmejson", function(data){ $("#jsonmodel").html(data); // what should this ...

Problem with jQuery's fade in/out in Firefox

I already asked here with no luck, but feel free to read it: http://groups.google.com/group/jquery-en/browse%5Fthread/thread/fdf7a584b30d4bb9 Hmm check out my site: http://www.crtaci.info/ on top-right position i have search field. When you move your mouse over there small text shows up that says: Napredna pretraga Now, for some re...

jQuery Selectors in list <li>

Can somebody advise me with jQuery selectors. I have a HTML list (see below) with four flag images in it. When a user rolls over a flag for example italy, I want it to fade out all the other three flags to 50% opacity. <ul id="flags"> <li id="German"><img src="images/flag_german.jpg" /></li> <li id="Italian"><img src="images/fl...