jquery

jquery/javascript content replace?how

erm...hi first, i wanna ask how to i change a facebook-style lightbox content with a textarea? i don't know how to exaplain,but i think the images below will say what i want http://img163.imageshack.us/img163/6248/93306989.jpg i'm using Facebox to do the pop up content,so how can i make the pop up content dynamic? Example: Edit the t...

jquery/javascript content replace?how reusable

http://img163.imageshack.us/img163/6248/93306989.jpg the images above show what i want, i'm using Facebox to do the pop up content,so how can i make the pop up content dynamic? <script type="text/javascript"> $(function() { $('.openExample').click(function() { $.facebox($('#exampleSource').val()); ...

Can I get the coordinates of a div with JQuery?

the postion of the div on the page varies. How can I get the y position from the top? ...

Why isn't this google.load, google.setOnLoadCallback script working?

Why doesn't this jquery work, according to firebug none of the javascript lines are being reached: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <script type="text/javascript" src="http://www.googl...

How can I pass an id to a function in jquery?

The following code allows the user to click on the question of a flashcard and it displays the answer. The problem is it displays all the answers for all the flashcards. How can I pass the id of each flashcard so that the user can click on the title and toggle the question open and closed? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...

Adding rows dynamically with jQuery

I'm building a form where I need multiple optional inputs, what I have is basically this: Every time a user presses the plus button a new row of form inputs should be added to the form, how can I do this in jQuery? Also, is it possible to automatically add a new row when all rows (or just the last row, if it's easier / faster) are fil...

Help with passing multidimensional JSON array to jQuery autocomplete via AJAX

I'm trying to implement a live search on my photos site using jQuery and the autocomplete plugin. Everything works when I specifiy the data locally: var data = [ {text:'Link A', url:'/page1'}, {text:'Link B', url: '/page2'} ]; However when I move this to PHP, jQuery is unable to parse the results properly. I'm really not sure what's...

jquery treeview plugin change link behavior (avoid collapse)

Hello, I am using the jQuery Treeview plugin. Have a look to the "Sample 1 - default" provided on the demo page of the plugin http://jquery.bassistance.de/treeview/demo/. In my case all folders and files are links. If I click for example on the expanded "Folder 2" it will first collapse and then follow to the link location. The behaviou...

Radioboxes and JQuery

Here's my HTML code: <label><input type="radio" id="fNuttig" /> Nuttig</label> <label><input type="radio" id="fNietNuttig" /> Niet nuttig</label> <label><input type="radio" id="fNogUitTeMakenNuttig" />Nog uit te maken</label> And here's my javascript code: if ($('#fNuttig').val() == 'on') { nuttig = 'Nuttig'; } else if ($('#fNietNut...

how to deal with async calls in Ajax 4.0(using jquery?)

in my code i have done something like this. $.get('/Home/Module/Submit', { moduleName: ModName, moduleParameters: moduleParameters }, function(result) { $("#" + target).html(result); }); when i put alert in the function(result) {..} it shows html perfectly(both in a...

Problem with jQuery Validation Plugin submission?

I am using "Inline Form Validation Engine 1.6.2, jQuery plugin" to validate form. But i want that on click of a link i.e.. <a href="#">Click here to submit</a> it should validate. as my form do not have submit button.. Please help.. ...

Is There any Performance Difference in the Ways of Writing a jQuery Plugin?

I'm curious, what are the (performance) differences in the ways that you can write a jQuery plugin, if any? I've seen it done a couple of ways: 1. Using $.extend(): (function($){ $.fn.extend({ newPlugin: function(){ return this.each(function(){ }); } }); })(jQuery); 2. Your own function: (function($){ $.f...

jquery datepicker

I`m using datepicker with month and year drop downs. I would like to hide displayed days. How can I do this ? ...

Javascript image zoom (JQuery)

I go throw the questions here and search the web for image zoom. I found one really nice: http://www.php-help.ro/examples/mootools1.2_image_zoom/ , the problem is that I'm not using MooTools and I can't use it. To find anything similar in pure Javascript or JQuery will be great. The requirement is that the zoomed are can be moved on th...

How to access jquery dynamically generted elements

Hi, I have this code. <div id="static_element"></div> <script> $(document).ready(function() { $("#static_element").html("<b class="dynamic_element">Test</b>"); //this row wont work $(".dynamic_element").css({"color":"red"}); }) </script> i want to access the tag "b" with the class "dynamic_element" but i c...

jquery block UI malfunction on ajax loading event

problem: trigger errored when block UI is called on this code (function($){ function preloader() { $('a#preloader').click(function(e){ e.preventDefault(); var url = base_url + 'runtest/preloader'; $('div#content').load(url, preloaderCallback); }); } function remotePrelo...

Using JQuery Validation Plugin

I was wondering if someone could help me using the JQuery validation plugin. I need to add the ability to make sure that a field only contains letters, numbers, underscores, whitespacke, and dashes. I currently have the following js code (not including the call to jquery and the plugin .js files) $(document).ready(function() { $("#inf...

How to run Browser command using jQuery / javascript?

I have one page in HTML , there are two buttons , save and print. When user click on the Print it should print the page and When user click on the Save page it should Open Save as... Box for that page. javascipt/jquery solution preferred. Thanks. ...

How can we know when pop-up window url is loaded (window.open) ?

I need to change the URL of the page in the pop-up as soon as it completes loading ( I am using window.open function call). Is there anyway I can find out when the page in pop-up has completed loading in the parent window? I cannot change anything in the page I am opening in pop-up, because it belongs to another website. ...

serialize form in jquery after elements adding

Hi! I'm dynamic add some inputs to my form by changing html() of some divs located in form. When i'm them serialaze this form inserted inputs doesn't serialized. what can i do? ...