jquery

bold text in textarea

Hi, i'm trying to write a very simple wysiwyg editor, where users can simply add bold text, hyperlinks and bullets, after selecting part of the text.. actualy just like CKEditor. But as far as i know there is no way to add formatting to a textarea. So I would like to know, how do other wysiwyg editors like CKEditor solve this. ...

How do I remove the default Google Search Value from Google Search box?

I am trying to use a little jQuery to "hide" the initial value in a Google Search box when you click in the box and I am missing something. Here is the search box code: <div id="search_box"> <form action="http://mfrp.ehclients.com/search_results" id="cse-search-box"> <div> <input type="hidden" name="cx" value="0174257249261220415...

jquery tabbed interface breaks when using images

hello all, using jquery to create a tabbed interface. coding is quite typical: html: <div id="tabbed-interface"> <ul> <li><a href="#option1">Option1</a></li> <li><a href="#option2">Option2</a></li> <li><a href="#option3">Option3</a></li> </ul> </div> jquery: $(document).ready(function(){ $('#tabbed-interface li:first').addClass('ac...

How to add a list item in the middle of a list with JQuery

I have a list with two items, I want to add additional items after the first item when the content is loaded. How is this done? I can add items, but they only show up on the end of the list. Do I have to call or use the list element array? First I create the new list item (<li>) and then I populate the list item with the content. But I ...

jquery next by class fade out

<div id="formheadtop"> <input class="checkbox" type="checkbox" /></div><div class="formbody"></div> <div id="formheadtop"> <input class="checkbox" type="checkbox" /></div><div class="formbody"></div> <div id="formheadtop"><input class="checkbox" type="checkbox" /></div><div class="formbody"></div> $(function() { $('input:checkbox').l...

Jquery, getting style: background (not background-color), border, etc, can't figure out how to do this

It seems that firefox automatically combines things, such as it takes individual css values, such as for "border-color", "border-width" and dumps them all into "border".. this makes things a pain for jquery as the .css selector can only select the individual ones, like "border-color", not just "border" or "background".. I need to get the...

Get ID of first LI of UL with jQuery

<ul id="someList"> <li id="listItem1">List 1</li> <li id="listItem2">List 2</li> </ul> Maybe I need to brush up on my selectors, but how would you grab the first ID of ul#someList? Also if I'm prepending LI's to ul#someList, will I need to grab the first LI's ID in a different way? ...

Why doesn't this closure have access to the 'this' keyword? - jQuery

I'm a beginner to closures (and Javscript in general), and I can't find a satisfactory explanation as to what's going on in this code: function myObject(){ this.myHello = "hello"; this.myMethod = do_stuff; } function do_stuff(){ var myThis = this; $.get('http://example.com', function(){ alert(this.myHello); ...

Put a div behind another but still show up above?

Ok this question may sound a bit convoluted, or at least esoteric, but I'll try my best to elucidate. In my charting application I have a div which is used as a popup tool tip. This tooltip appears when you hover over a datapoint and gives you some information. I used z-index to make the tooltip render above the underlying chart div. H...

What is a good way to regenerate HTML table on jQuery event, instead of appending to div element?

My plan was to use jQuery's .data() method to store my table row information in a hidden div element. Then, upon clicking an Add or Remove row button, I would modify the jQuery data in the hidden div, clear the table div contents, and then regenerate the table's rows from the data stored in the hidden div. To start with, my project han...

jQuery UI without HTML

Is there a project (open source) that takes the widgets and plugins for jQuery UI but allows us to use them without setting up any HTML? Kinda like Ext-js and Sproutcore, but without the acidental complexity and lack of fluidity, and more like Cappuccino, but without requiring a Mac and the horrible load times from Objective-j (which al...

maintain scope with javascript

How do I maintain scope with this? Original var Base = new function() { var canvas; var context; this.init = function() { console.log("Canvas: " + $("canvas")[0]) this.canvas = $("canvas")[0]; console.log("Context: " + this.canvas.getContext('2d')) this.context = this.canvas.getContext...

New Function: How to iterate through all form elements before returning true or false

Hi there, I have a new function that I will be calling when the submit button is pressed for the form. I'm trying to use this validation, not a plug-in, for experience. How would I iterate through all the forms, determine if they're all valid, before exiting out of the function. Though if they're all valid, return true and continue, othe...

How can I learn the basics of JQuery?

Possible Duplicate: jQuery free eBook? Where can I get the e-book for jQuery? ...

Algorithm to stop flickering (clear box and re-populate) when adding text

Hey all, I was wondering if there's a some algorithm or resource that will look at the changes made from an AJAX request and not update the whole box (causing a flicker) but just add/remove the changes made. This is specifically used with the keypress command. A good example is stack overflows "preview" it doesn't flicker when you ad...

Why the remote validation doesn't work?

Hello all, I follow the demo http://jquery.bassistance.de/validate/demo/marketo/ and met some problems to achieve the same remote validation function. Here is HTML I used. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-200000126/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://...

AJAX - Codeigniter

Hi all, Having gone through all the exisiting questions, I could not find a solution to the problem I was facing. I have a Codeigniter application, which on one of it's views has a form which makes a AJAX call to submit data. I have the Jquery code working for two AJAX calls but for one of the calls, from what I monitor in the header ...

count number of divs for each container in jquery

How can I count the number of divs with the class of "slide" in each set. In the example below the first group "item" will and up with three and the second group will have two. I've been trying to use .length but it adds all of the "slide" divs up. <div class="item"> <div class="foo"></div> <div class="bar"> <div class="slide"...

jquery Stop Animation on last image

Hello, I'm new to jQuery and have a simple script that scrolls through three images, the problem is I can not get the animation to stop on the last image. var tt, nn; jQuery(document).ready(function(){ jQuery("#promobox").innerfade({ animationtype:"fade", speed:"slow", timeout:1000, type:"sequence", containerheight...

Jquery ui tab-wise validation

I am using UI tabs and i want to validate each tab. When I click the second tab i must validate the first tab.If tab is valid go to second tab, if tab is not valid stay to the current tab and fill in missing form elements.And so on for all my tabs. Can anyone help me with this. ...