jquery

Javascript only working in Firebug

I am using jQuery UI to build tabs on my page. That works well until I add this following piece of code. $(function () { $('#tabs').children("div").each(function (index) { $('#tabs').tabs('load', index); }); }); I'm trying to preload the tabs. What is interesting, is that if i run this through Firebug and put a breakpo...

fullcalendar adding events from mysql json - adding eventClick returns blank page

I am pulling events into the calendar using JSON and php. I am know trying to add evenClicks or mouseOver events the the calendar and when I do I get a blank page. My JS knowledge is rather novice so at this point I'm stuck Heres my calendar script $(document).ready(function() { $('#calendar').fullCalendar({ header: { left: 'pr...

setTimeout Problem..

hello sir, i got a problem with setTimeout.. i dont know why this will not work.. $(document).ready(function(){ var counterNum = 0; function tick() { addText(counterNum); setTimeout('tick()',1000); counterNum++; } function addText(strNum) { $("div.counter").empty(); $("div.counter").append(strNum); } }...

Is 000,000,000.00 greater than zero?

I have an input mask on my text box like 000,000,000.00 I have the following jQuery code to check the value of text box before submitting data. var txt_box = $('#txt_box').attr('value'); if(txt_box <= 0 ) But now even if I didn't input any data, the box remains empty with only the input mask, data is submitting. ...

Filtering google maps markers with a checkbox

Hi, I'm trying to filter my google maps markers from a checkbox, based on this V3 example. My checkbox html is: <form action="#"> Attractions: <input type="checkbox" id="attractionbox" onclick="boxclick(this,'attraction')" /> &nbsp;&nbsp; Food and Drink: <input type="checkbox" id="foodbox" onclick="boxclick(this,'food')" /> &nbsp;&...

jQuery this and Selector $(this:first-child).css('color', 'red');

Is it possible to use a :selector with the following in jQuery? $('.galler_attr').bind('click', function() { $(this:first-child).css('color', 'red'); }); ...

Getting data from nested array passed to Javascript / Jquery from PHP / Cakephp via JSON

Sorry for asking a basic question like this but I've been reading on this for a few hours now and the examples aren't making sense to me in context of the way my array is.. I have been able to pass this from my server side (cakephp) to the javascript (I'm using jquery) but after that, I am lost as to how to make use of the data.. I tried...

Load WordPress posts using jQuery

I have a page setup with the following code: <?PHP get_header(); ?> <div class="wrapper clearfix"> <div class="clearfix"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="page-header"> <h2 class="section_title"><?php the_title(); ?></h2> ...

show/hide div depening on input value

I want to show div#cool when user will type "cool" in input field or div#good when user will type "good" and so on. Everything should work in real-time. ...

How do I make an HTML button’s onclick event trigger one of two different functions at random?

How do I make an HTML button’s onclick event trigger one of two different functions at random? I’m using PHP on the server, and jQuery on the client. Using this code when i click the button image nothing happens... function a(){ alert('A got called!'); } function b(){ alert('B got called!'); } $('#button').bind('click...

firebug console

Hello, The following is my block of code. since I haven't installed Firebug in IE, Every time when I try to test my code in IE I'm getting an error message console is undefined. so I decided and developed this block of code, so that console.log work only in firefox and to avoid error messages in IE. function clog() { if(window.con...

How does one have multiple modal forms on a page using jQuery UI?

I need to have multiple buttons each popping up a different modal form using jQuery UI. Is this possible? How? ...

how to get selected text from iframe with javascript ?

how to get selected text from iframe with javascript ? ...

jQuery UI Datepicker altField .change function not working?

Can anyone tell me why the console.log line isn't getting run when I select a date with the jQuery UI Datepicker? Thanks for reading. <script type="text/javascript"> $(window).ready(function() { $(function() { $("#datepicker").datepicker({ altField: '#dateIntermediate'}); }); $('#dateIntermediate'...

Jquery: Automatically сalculate div width to prevent horizontal scrolling

Hi Have a "liquid" layout that has fixed width for left side and "elastic" right side. For some reasons can't change markup of the layout. The trouble is: Sometimes the right side becomes very wide (depending on the content inside) and horizontal scrolling appears. Is there an ability to control max width of the right side to preven...

What's the best way to add jQuery enhancements to a website?

For a while now, I'm been using jQuery to offer enhancements via JavaScript on my websites. However, I'm now beginning to ponder—from a performance point of view—what is the best way to organise my file of functions? Up until now, I've done something similar to the following: $(document).ready(function() { foo(); bar(); }); fun...

How to facebook user's information.

Hi, I am using facebook graph. I am able to retrieve the access_token. Now I want to get info using https://graph.facebook.com/XXXXXXXXX/?access_token=111978178853984|2.1lD7XrS1n7C3UgudmiSpQg__.3600.1279976400-10000XXXXXXXXX|9vJZuRDvlzLhFfGkqGkg92KmDSE. I already multiple ways to retrieve json output. 1) jquery.getJSON method - Fal...

jQuery Validation: Validate dynamicly generated fields only on the first field.

Hello, Yes, I know this question has been asked a few times before. But I am confused with the answers. I thought I would have to somehow 'refresh' or use live to add the validation each time I add a new input field. Also I checked out the demo and I think I am missing something. I don't really see any code that adds validation each ti...

load jquery htmlbox with ajax

I use this code to load a htmlbox-instance to my page (this page also loads the necessary libraries to use htmlbox in the head-section): <div id="container"></div> <script language="Javascript" type="text/javascript"> function showEditPnl() { var pnl = document.getElementById("container"); if (window.XMLHttpRequest) { // code...

Multiple Jquery dialogs on page using same classes.

I have multiple places on my page where I want to open a jquery dialog boxes when a link is clicked. I am using class selectors so in theory I should be able to open each of them. My problem is that with the code I have it will only open the first dialog I click. Why is this??? //modal help div $('.dialogbox').dialog({ ...