jquery

how to correctly use .each here?

This is basically for a library I'm building. In this module I'll attempt to build a debug helper library to help me during debugging. My problems here are that when FDL.D.ListEvents() is called a couple of awkward things happen: 1) If I include enough _logEvent() calls, the last few stop closing their groups at the console, which m...

Trying to clean out form inputs with jQuery so I can add it back into the form

I have a pretty simple HTML form where users can enter in information about a person. Below that form is a button which allows them to 'add more'. When clicked, the 'person' form is copied and appended to the page. The way I used to do this was to take my HTML file, copy out the relevant section (the part that gets 'added more') and the...

Javascript cookie expiration/deletion on different browsing scenarios

A client requested cookie functionality where if the browser is not closed, the cookie has a 30 minute expiration, but then it needs to be removed if/when a user closes the browser. Here's how I was going to do it: delCookie = function() { document.cookie = 'cookieName=;expiration=Thu, 01-Jan-70 00:00:01 GMT;'; }; $(window).unlo...

how can I create jquery based submenu tabs ?

I would like to create jquery based navigational menu in which my main menu is on the left hand side and on click my submenu items should ne display in the main content area in tabs . I am able to achieve it in Ext-js but how to do it using jquery. for eg. if you visit http://www.trirand.com/blog/jqgrid/jqgrid.html and clicking on the ...

can i have a multi class selector in jquery

Can I do something like the below where I can have multiple classes trigger an event? $('a.red a.blue a.green').click(function(event) { }); ...

jQuery, html(), append() issue with IE

Hello i'm having problem writing data (html, contains tables) returned from an ajax request to a div. The code works on Chrome, firefox..except IE (tested on IE 8) I use the following code: function ajax_test(option) { $('.loading').fadeIn(); $('.roto_messages').empty(); $.get("options.php?i="+option, function(data) { ...

Arguments for Prototype over jQuery for Rails?

I have never used Prototype before. But now when I'm using Rails, it seems to me that it doesn't only manipulate the DOM/Ajax but also the language itself. Example: http://api.prototypejs.org/language/hash/ It was a long time ago I used jQuery, but I recall that the framework didn't have these features right? Is this a good feature f...

Using a custom validator in a variable length list in Microsoft MVC 2 (client-side validation issues)

I have created a variable length list according to the many great posts by Steve Sanderson on how to do this in MVC 2. His blog has a lot of great tutorials. I then created a custom "requiredif" conditional validator following this overview http://blogs.msdn.com/b/simonince/archive/2010/06/11/adding-client-side-script-to-an-mvc-conditio...

API Upload file in Wordpress

I am not sure if Wordpress has API to upload file but what I am looking for is very simple: Context: I have another plugin that I need to modify so that user can upload file in the Admin area of that plugin Solution: 1. Rewrite a new upload thru some specific path. This has nothing to do with Wordpress. I am fine doing this. 2. I prefer...

Trying to set MetaTag dynamically

i'm trying to dynamically set a metatag to the head of my document. This is a mobile device specific metatag that I need to add through code. I found this solution here: http://stackoverflow.com/questions/2831529/having-trouble-using-jquery-to-set-meta-tag-values but it doesnt seem to work, what am I doing wrong? function setOrCreateM...

How to get selected radio value using Jquery

Hi i want to get radiobutton value using jquery. This is the radiobutton code. The period[count] naming is because the radiobutton is loop in array using javascript <input type='radio' name='period["+count+"]' value='1' checked/>Full<input type='radio' name='period["+count+"]' value='0.5'/>Half (AM)<input type='radio' name='period["+cou...

Calling a function to define a variable

Inside a function, I've got: var myType; if ( $(this).is(".whatever") ){ myType = typeOne; } else if ( $(this).is(".something") ){ myType = typeTwo; } This works fine. However, I want to turn this into a separate function that I can call, since I use it in several different places. The function I write is: function setMyType(){ ...

Print japanese with jQuery

Hi I'm trying to print some Japanese to a page dynamically using jQuery, and it display nothing recognizable. I don't know what went wrong, I reduced the code to the most straight-forward, and it doesn't fix it. Or maybe it's just me being thick. I use: $('body').append('<p>日本語</p>'); Which should work, right? And I get: 日本語...

Call an external function from inside function in jQuery

I try to extend jQuery, but when I call myTest this will return this.myTest.test() is undefined... can someone tell me why... (function($) { $.fn.myTest=function() { var x=function() { this.myTest.test(); var b = function() { this.myTest.coba(); } } x();...

Jquery Galleria Thumbnail not displaying

I had set up Galleria Plugin successfully. But the problem is that the thumbnails for each picture is not generating. My Code is below <div id="galleria"> <img title="Image title" src="images/1.jpg"> <img title="Image title" src="images/2.jpg"> <img title="Image title" src="images/3.jpg"> <img title="Imag...

When and how can I use a JQuery function ? - easy one

I want to know that when we have a function with parameters that works like a VB procedures When and how can I use this function ? How can we call this ? <script type="text/javascript"> function place(div, image_x, image_y ) { $("#"+div).css("position", "absolute") ; $("#"+div).css("left",image_x+"px"); $("#"+div).cs...

Need to create unique image selectable function in jquery.

I have try with toggle function in jquyer but its not working for multiple LI and I tried with the selectable function not working. Need to create unique image selectable function in jquery. I have many li with inside image on click on image li will get background color. suppose I click on other li image that should get background and o...

Upload a file using PHP and Jquery without displaying the browse window?

Hi Friends, I want to upload a file using PHP and Jquery.I know the path where it is saved(Path is static with the same file name).Every time when the user click the upload button then I need to upload the file in the backend and displaying only the uploading gif image in the front end.So is it possible to make the upload without display...

How to set the custom image at the start based on user click of the Jquery Galleria slideshow

i have set up jquery galleria successfully. But what i want is to set up the first image loaded on the galleria dynamically. i.e., consider there is five links as one,two,three,four,five. when the user clicks the link three, the galleria will appear and display the gallery with THIRD image atfirst plz help. ...

Help needed in dealing with URL

Hi There, I am developing an app using twitter API,in which any user can enter his twitter username in textbox and get his followers. On home.php , I am using jquery. on click event of button, I am calling getinfo.php and passing textbox value along with it. This is the case so far. What I want to do? Right now my url is: http:/...