[jQuery] Re: what editor do you use?
Zend Studio. On Feb 13, 2008, at 12:15 PM, Alexandre Plennevaux wrote: aptana studio On Feb 13, 2008 8:49 PM, Mika Tuupola [EMAIL PROTECTED] wrote: On Feb 13, 2008, at 6:38 PM, Feijó wrote: I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/ ) its freeware, nice resources, like macros, quick-text, highlighted source, .. Textmate with jQuery bundle, of course :) http://macromates.com/ http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery -- Mika Tuupola http://www.appelsiini.net/ -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: Disappearing events?
Use either the live query plugin OR, reapply the events. The issue is, the events are added once the dom is ready. after that, the functions never get called again. So if you change out elements, your events are gone. Live Query solves this. Kyle On Feb 11, 2008 11:13 AM, Nate [EMAIL PROTECTED] wrote: I created three table elements using jquery, and each td cell in the tables has hover and click events attached to it. The basic table generation is cached in an array and the only changes that happen to the initial content occur by updating individual td contents using $(this).text(val). All of the events fire correctly the first time a table is rendered, but when the table is updated, only using .text(..), the events disappear. I've tried tracing what is happening, but eventually get lost, and was hoping someone would be able to explain why the events are disappearing. Here are the affected parts of the code for reference: var drawInitial = function(wks) { var cal = []; for(var i = 4; i = 6; i++) { cal[i] = $('table cellpadding=0 cellspacing=0 border=0/table'); for(var j = 0; j i; j++) { drawWeek().appendTo(cal[i]); } } drawInitial = function(wks) { return cal[wks]; } return drawInitial(wks); } function drawWeek() { var wk = $(tr/tr); for(var j = 0; j 7; j++) { drawDay(j).appendTo(wk); } return wk; } function drawDay(dayOfWeek) { var css = ; (dayOfWeek == 0 || dayOfWeek == 6) ? css = calendarWeekend : css = calendarWeekday; var day = $('td class=calendarBox '+css+'/td'); day.hover( function() { if($(this).text()) {$ (this).addClass(calendarHover);} }, function() { if($(this).text()) {$ (this).removeClass(calendarHover);} } ); day.click( function() { if($(this).text()) { setSelected($(this).text()); } else { delayHide(); } }); return day; } function drawMonth() { var year = widgetDate.getFullYear(); var month = widgetDate.getMonth(); var firstDay = new Date(year, month, 1).getDay(); var daysInMonth = Date.getDaysInMonth(year, month); var weeksInMonth = Math.ceil((firstDay + daysInMonth) / 7); var cal = drawInitial(weeksInMonth); var i = 0, //week j = 1; //day of month cal.find(tr:not(.calendarWeek)).each( function() { $(this).children(td).each( function() { if(j firstDay j = firstDay + daysInMonth) { $(this).text(j - firstDay); } else { $(this).text(); } j++; }); i++; }); $(#+widgetId).html(cal); }
[jQuery] Re: Test if jquery has loaded
Of course it would fail if the function didnt exist. Thats the point. He wanted to know how to check if it was loaded or not, so If the alert doesnt show up, its not loaded. On Feb 6, 2008 11:48 PM, Shawn [EMAIL PROTECTED] wrote: That would fail if jQuery hasn't loaded. It would give an error saying something like $ has no properties, or $ is not a function. You could try something like this: if (jQuery) { alert(jQuery loaded); } I haven't tested this but don't see why it wouldn't work... HTH Shawn Kyle Browning wrote: $(document).ready(function() { alert('hi'); }); This uses jQuery's .ready function on the document object On Feb 6, 2008 2:41 PM, MikeeBee [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Is there a small piece of code you can put on a page to test if jquery has loaded? Thanks
[jQuery] Re: on click event does not response
THe problem is in the order in which things are happening in your script. If you take a look at the livequery plugin this might help. But, you should apply the click after the DOM has been manipulated. Since DOM is parsed in the beginning of the page load, nothing happens when you add / remove things into it, the click events are gone. A simple reapply of clicks after classes have been added will fix this. On Feb 6, 2008 9:46 AM, Jquery lover [EMAIL PROTECTED] wrote: hi all, I have problem with my code, when I used jquery to append HTML tags to my list the click event of the new tag did not work, so i decide to move to DOM and the same problem appered again. Here is a snapshot of my code //does not response !!! $(.test).click(function(){ $(#content).empty(); return ; }); // creating element $(a div#textbox).click(function(){ var list = document.getElementById (form_list); var list_element = document.createElement (li); var link = document.createElement(a); $(link).attr(class, test); $(link).attr(href, #); var text_val = document.createTextNode(tes tes test); list_element.append Child(text_val); link.appendChild(list_element); list.appendChild(link); return false; });
[jQuery] Re: Test if jquery has loaded
$(document).ready(function() { alert('hi'); }); This uses jQuery's .ready function on the document object On Feb 6, 2008 2:41 PM, MikeeBee [EMAIL PROTECTED] wrote: Is there a small piece of code you can put on a page to test if jquery has loaded? Thanks
[jQuery] Re: Tab Effect
Hey no problem, and yea. I think they are moderated On Jan 30, 2008 7:23 AM, studiobl [EMAIL PROTECTED] wrote: Thanks, ocyrus! That helped! ...it does take dismayingly long for posts to show up here. On Jan 29, 1:49 pm, ocyrus [EMAIL PROTECTED] wrote: I recently solved this solution this way, $(document).ready(function(){ $('#profile-nav').children().each(function(){ $(this).click(function(){ toggleTabs($(this)); return false; }); }); }); function toggleTabs(tab) { tab.siblings().children().removeClass('on'); tab.children().addClass('on'); var div = tab.attr('class'); div = div.split('-'); div = div[1]; $('#'+div).parent().children().each(function(){ $(this).hide(); }); $('#'+div).show(); } and my html looks like this. ul id=profile-nav class=clearfix li class=tab-biographya href=# class=onBiography/a/li li class=tab-backgrounda href=#Background/a/li li class=tab-contacta href=#Contact/a/li /ul with three divs later div id=biography class=pro-tabInfo/div div id=background class=pro-tabInfo/div div id=contact class=pro-tabInfo/div On Jan 29, 9:46 am, studiobl [EMAIL PROTECTED] wrote: I have a set of tabs that use the sliding doors technique. The tabs are built on an unordered list, with each tab being a list item containing an anchor. Each tab is decorated by placing a graphic in the background of its list item for the left part of the tab, and the background of the anchor for the right side of the tab. These graphics then need to be switched out to display the active view. The actual html page is not changed. This tab navigation just triggers the visibility of various areas of the page. I'm trying to use jQuery to switch out the graphics. The problem I'm having is in selecting the list item that contains the clicked-on anchor. There are a number of techniques for selecting children, but none for selecting parents. One question I have is if there is any way to reference a previously selected element in a jQuery selector statement. Like this: $(.tabs a).click(function(){ //Now you can reference the clicked on anchor as this $(.tabs li:has(this)).doSomething(); }); I doubt that this is possible, I haven't tested it yet, but I can't think of too many other options. Any suggestions?
[jQuery] Re: AJAX file management
http://labs.adobe.com/technologies/air/ Air is free. On Jan 29, 2008 11:39 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for the link. I notice this goes for $289 for a commercial license. Know anything that's freeware? - Dave On Jan 29, 11:00 am, Glen Lipka [EMAIL PROTECTED] wrote: Check out the examples inhttp://extjs.com Specifically the Web Desktop demo, as well as the tree demo. You also might be interested in Adobe AIR, which allows for more integration with the OS. Glen On Jan 29, 2008 8:53 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Can anyone recommend anything that allows you to manage files stored on the web in a tree-like GUI, allowing for drag-and-drop. I'm thinking of a web-based equivalent of what you may do with files on your desktop. Thanks, - Dave- Hide quoted text - - Show quoted text -