jquery

Javascript callback functions execution

I'm not sure the correct term for this. But I want to write a function that accepts another function and execute it. For eg. function test(data, aFunc) { var newData = data + " Shawn"; aFunc.call(newData); } test("hello", function(data){ alert(data); }); Data is supposed to contain "hello Shawn" string. Help me rewrite this...

refetchEvents in jquery fullCalendar doesn't work in IE.

Has anyone else had this problem? Here is some code: $(document).ready(function() { $('#calendar').fullCalendar({ editable: true, disableDragging: false, height: 400, weekMode: 'variable', defaultView: 'agendaDay', allDaySlot: false, weekends: false, minTime: 7, ...

ajaxForm with jquery validate

I am trying to combine ajaxSubmit with the validate plugin Here is my code It says the ajaxSubmit is not a function $("#send-reply").validate({ meta: "validate", errorElement: "em", errorClass: "error", validClass: "success", highlight: function(element, errorClass, validClass) { ...

load articles ajaxly in joomla

Hi there, Is there anyway to load content body by click on its title ajaxly in the same page? should I make changes in template or use an extra extension? also just can use javascript plugins and not changing them unless they have a specific manual for the certain plugin. Regards... ...

jQuery method to a search box with a dropdown menu in it

It's easier to show you what I am trying to do with jQuery. I'm looking to make a menu within an input field like Oodle has at the top of their site in their search bar: http://www.oodle.com/vehicle/ . Can someone point me in the right direction? Thanks! ...

how does comet work with php?

when i use comet iframe i just send script tags from backend php file to front end and javascript is displaying it. can someone explain briefly where a comet server comes up in the picture and how the communication will be between frontend (javascript), backend (php) and the comet server. cause i read that if you are going to let a lot...

Jquery selector: How to: change the src attribute of an image tag on link hover

I need to change the src attribute of the image when the link is being hover on <div class="clear span-33 last" id="navigation"> <div class="hicon span-1"><a href="#" title="Homepage"><img src="../Assets/images/home.png" /></a></div> </div> Also change it to default when the link is not hovered on... ...

IE jQuery ajax results in a stack overflow

I have the following code that in IE gives me an error in jQuery for "open(G,M.url,M.async" $("#submitButton").click(function(){ $.ajax({ type: "POST", url: "http://url.com/postChat.php", data: "comment="+$("#userInput").val(), success: function(msg){ } }); }); ...

Rails, jQuery, .js.erb files, JS not executed by the browser.

I'm trying to use jQuery, and everything has been great, until now, when I'm trying to render a partial and append it to a div. Here is how I have it set up: I have an action that responds to js: def index @objects = Object.find(:all) respond_to do |format| format.js end end And a template called index.js.erb with some jav...

Conditional query from html controls

I want to build a web page where user can select data from different html controls and form a conditional query. For instance a == 2 and b == 4 and c == 6 or x == 0 The data for a, b, c and x comes from html controls and user is also able to delete different conditions in the query. Later I want to transform this query into j...

PHP json_encode results and jQuery

Hi stackers, I'm trying to take a jSON encoded string out of my database and loop through the items but I'm having some difficulty. Here's the string in the database: ["volunteers","seat_dedication_program","memberships"] And here is the code: //Looks for _checkbox when looping through my database fields (object dbVals) and turns i...

IE6 and 7 bug causing a big headache

Hey guys, I've spent hours looking at this, and am hoping a fresh pair, or even a more experience pair of eyes on this may help get it solved. Whilst IE6 support isn't especially needed, IE7 is, and that's causing problems for my image scroller. Can anyone possibly take a look and see what's causing the massive spacing above and below t...

jquery dialog from sitemapnode

I Have a asp:Menu item in my masterpage file and it is using a sitemap. In my sitemap file, i have some sitemapnodes: <siteMapNode> <siteMapNode url="qq.aspx" title="qq" /> <siteMapNode url="#" title="Feedback"/> </siteMap> in the codebehind file of my masterpage, I add a javascript function to the feedback node: protected void me...

Jquery toggling each and every div with same id

I want to toggle a bunch of divs that each have the same id. My current jquery code only toggles one div. (I've tried using a mixture of .next and .parent.next, but haven't found anything yet) $('#body'+id).toggle('400'); So: There would be multiple divs with a '#body2010' id. I want to toggle all of those. ...

Creating a jQuery Image Slider

Hi, Im trying to create a jQuery Slider like this http://bit.ly/5YFTs8 I cant find any tutorials or plugins anywhere that make em like this one. Cheers ...

How can I attach event handlers to dynamically-generated DOM elements using jQuery?

I have a <ul> tag that I want to append some <li> tags inside. Example: $('body').append("<ul id='myUL'>").find("ul"); $('#myUL').append('<li id='a'>a</li>'); $('#myUL').append('<li id='b'>b</li>'); I want to give every <li> a different click event. How can I accomplish that? ...

how do i create sub groups within table using jquery?

i am creating a stock portfolio. each row is a stock and it's data including profit/loss. each row has a groupid that the user can specify. the idea is i want to: 1) physically group the rows based on the groupid 2) after step #1 i want to dynamically add a row below that group with the subtotal of the profit/losses for that group on...

Capitalize first letter of text field WHILE typing with Jquery?

I'm looking for an example of how to capitalize the first letter of a string being entered into a text field. Normally, this is done on the entire field with a function or regex onBlur or OnChange, etc... I want to capitalize the first letter while the user is STILL typing. For instance, if I'm typing the word "cat" -- The user should...

JQUERY, Extract only the first paragraph

Given a block of text in a TEXT EDITOR (CKEDITOR), with paragraphs contained in PARAGRAPH tags, how can I do in JQUERY to extract only the first paragraph Example: blah blah blah blah blah blah blah blah 123123blah blah blah blah blah blah b1212lah blah blah blah blaasdasdadsh blah To Just: blah blah blah blah blah Thanks ...

jquery appending in the page

hello i'm using ajax to get some information to my page the information received in an array so i use for loop to append them to my html page in this way : for i to i less than my information i++ $('#ul').append("<li>"+info[i]+"</li>"); but i want to add a different .click event to every 'li' tag but i don't want to loop another...