Re: [jQuery] Not working for me in IE7, but works in IE8
If I tell you the (possible) answer, will you turn off the music on the home page? :-) Karl Swedberg mentioned in another thread today that you may have trouble in IE6 if you try to set a background color on a TR. It has to be on the TD's instead. Maybe this is the case for IE7 too. So I would try changing this part of your CSS: tr { background-color: #fff; } .alt { background-color: #B7FFB7 !important; } to: td { background-color: #fff; } .alt td { background-color: #B7FFB7 !important; } -Mike On Fri, Jan 1, 2010 at 11:45 PM, cybervigilante cybervigila...@gmail.comwrote: I just tried a simple alternate colored table rows in jQuery 1.3.2. It works fine in the good browsers, works in IE8, but doesn't in IE7. I thought jQuery worked in IE7. I'm using the IE multitester suite. (It doesn't work in IE6 either, but I stopped thinking about IE6 except in the dead sense ;') Here's the site - it's a table of religious days on the front page. http://celestialchurchqueens.org Here's the code - very basic. The alt class gives a light green color in IE8. I thought maybe my testing suite is off so I'd like to know if anyone else sees a lack of color bands in IE7. jQuery(document).ready(function() { jQuery('tr:odd').addClass('alt'); }); This is a Joomla site, and since Joomla has an ancient version of MooTools embedded, I'm using jQuery instead of $ in compatibility mode.
[jQuery] Re: trying to do Math.min on 3 tds by excluding if one = 0
Thanks , great solution. i figured out on on my own that is quite different. i don't know which is the best i terms of performance. i create an array numbArray first of the elements then i do this. var index= $.inArray(0, numbArray); if(index== -1) { //Value not found in the array. } else { numbArray.splice(index,1); } var ithis = Math.min.apply(Math, numbArray); Thanks for your solution. Happy new year. On Jan 1, 7:45 pm, Šime Vidas sime.vi...@gmail.com wrote: This shoud do the job... $(tr. + i).each(function() { var ithis = $(this).find(td:lt(3)).map(function() { if ($(this).html() === 0) { return null; } else { return this; } }).min(); $(this).find(td.r1).empty().append(roundVal(ithis)); }); so, you select the first 3 cells, and then do the map function, which is similar to each... for every selected cell, if its content is 0, then deselect it... so after the map function, you only have those cells that doesn't contain 0, on them you run min()
Re: [jQuery] Not working for me in IE7, but works in IE8
Just to clarify that thought, I really like the music a lot! I just don't like having it start playing automatically when I visit the home page. -Mike On Sat, Jan 2, 2010 at 1:56 AM, Michael Geary m...@mg.to wrote: If I tell you the (possible) answer, will you turn off the music on the home page? :-)
[jQuery] Help needed with textarea.
Im unable to store any values from the textarea input. When ever I run the for loop to retrieve the values from the array, it is displayed as undefined. I not sure how to solve that problem. Any help would be appreciated. $(document).ready(function(){ var choices = new Array(); var prev = 0; var nex; for(i = 0;i 10;i++) { $('#textarea1').bind('keypress', function(e) { if(e.keyCode==13){ nex = $('#textarea1').val().length; choices[i] = $('#textarea1').val().substring(prev,nex); prev = nex; } }); } for(i = 0;i choices.length;i++){ $(#div1).append(p + choices[i] + /p); } }); -- View this message in context: http://old.nabble.com/Help-needed-with-textarea.-tp26991838s27240p26991838.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] get serializeArray of form which should not contain some elements having certain names
I want to get the array of all the formElements except some input type having specific name. I know the normal way is $ ('#form1').serializeArray() but how to use selectors to get me array of all elements except some elements having given name as method and trId? Let me give you a example I have form as form id=form1 input type=hidden name=method input type=hidden name=trId input type=hidden name=appli input type=textbox name=text1 /form1 I want to serializeArray of form1 where it should not have fields such a method and trId How to achieve this Thanks in advance CSJakharia
[jQuery] Anchor Child Not Responding to Hover
I have the following markup: a href=# id=closespan/span/a The span is hidden by CSS. I then have the following jQuery code: // Hook close button hover $('a#close').hover( function(){ $('span',this).fadeIn(); }, function(){ $('span',this).fadeOut(); } ); This does work only when the child span is displayed (not hidden via CSS) by default. If the span is hidden, it doesn't do anything. I'm tearing my hair out over this. I've rewritten those 8 lines over and over, so I'm pretty sure it's not syntactical. Just for kicks, here is the CSS: div#toolbar a#close { display: block; float: right; width: 48px; height: 100%; background: transparent url('close.png') center center no-repeat; margin-top: -10px; } div#toolbar a#close span { display: block; width: 100%; height: 100%; background: transparent url('close_hover.png') center center no- repeat; display: none; }
[jQuery] Re: Element Exact Width
obj.html(obj.children().html()); obj.children() selects the SPAN that we created... obj.childern().html(), therefore, returns all the content of the SPAN, which was originally the content of the P we want to set the content back from the SPAN to the P... so, we have to put the content that we selected inside the html() method ... obj.html ( obj.children().html() )
[jQuery] Re: Anchor Child Not Responding to Hover
I solved it by hiding the span with hide() rather than CSS. Although I'd like to know why straight CSS breaks this while adding display:none; via JavaScript works fine.
[jQuery] TreeView in WordPress (how to install and use?)
Hi, I want to implement bookmarks (something like when you press CTRL+B in your browser) in my WordPress site. It seems to me that TreeView jQuery plugin would be the best solution. I have no idea how to implement it. Could somebody guide me? I searched and found that jQuery is part of WordPress installation. I am running WP 2.8. So I do not have to install jQuery itself. So could somebody help me with how to - install TreeView plugin under my Wordpress instalation? - how to implement/insert Treeview into my Wordpress site? - could I have the items within the tree clickable? Can I have two links there? - can I create a link that leads to particular item within the tree? - is there any tool how to create the source code of the tree? I will update the tree quite regularly - would Wordpress search work for Treeview? thank you, R
[jQuery] $.ajax - different results in Chrome and Safari.
The following code gives a a parser error in Google Chrome and Firefox but seems to work in Safari. Can anyone see what I am doing wrong or understand why this is happening? Thanks for your help and time. html header script src=js/jquery-1.3.2.min.js type=application/x-javascript charset=utf-8/script /header script $.ajax({ type: GET, url: http://query.yahooapis.com/v1/public/yql;, data: { q: SELECT * FROM flickr.photos.search WHERE text='Cat', format: json, diagnostics: false }, dataType: json, async: true, success: function (data, textStatus) { console.log('1 - ' + typeof(data)); console.log(data.responseText + ' text :' + textStatus); }, error: function (x,t,e) { console.log('Error --1 : ' + x + t + e); console.log(x.url); console.log(x.status); console.log(x.responseText); } }); /script /html
[jQuery] Help with dynamicaly created table
Hi, Im currently using the tablesorter plugin to style a table im using, the code is the following: $(document).ready(function(){ $(#shop_list) .tablesorter({widthFixed: true, widgets: ['zebra'], headers: { 2: { sorter: false }, 3: { sorter: false } } }) .tablesorterPager({container: $(#pager)}); }); As you can see it applies the plugin to the table id 'shop_list' and works fine on page load, I also have buttons on each record of the table that deletes them: $('.delete_button').live('click', function() { var id = $(this).attr(id).split(_); var id_store= id[1]; jConfirm('Delete store?','Confirm', function(r) { if (r==true){ $('#async_div').load('store.async.php? async=4id_store='+id_store); //Delete store $('#table_div').load('store.async.php? async=1'); //Update Table } }); }); store.async.php contains all the php functions for that page and its working fine the problem is that when the table updates with the deleted record off the tableSorter plugin doesn't reapply. I've tried playing with the live function but I havent been able to make it work. Is there any way to do it? Or a better way to update the table without reloading it? Thanks in advance!
[jQuery] css editor with jquery
Hello, i made a proof of concept about a css editor made with jquery. You can see and download it from: http://tt4fn.netsons.org/fonte Is possible to edit almost all the page, for each section there are 34 css customizable options. But now I've a trouble: how can I push the generated css and save it? Tnx Alfredo
[jQuery] Re: Help needed with textarea.
The issue seems to be that you are thinking that the second for loop will run after the keypress event is called... *it's not*.. it will only be called on document.ready... I was going to use jsbin.com to work up an example for you, but i have absolutely no idea what the first for loop's purpose is, so unfortunately i cannot help further On Jan 2, 5:26 am, direheart direhe...@hotmail.com wrote: Im unable to store any values from the textarea input. When ever I run the for loop to retrieve the values from the array, it is displayed as undefined. I not sure how to solve that problem. Any help would be appreciated. $(document).ready(function(){ var choices = new Array(); var prev = 0; var nex; for(i = 0;i 10;i++) { $('#textarea1').bind('keypress', function(e) { if(e.keyCode==13){ nex = $('#textarea1').val().length; choices[i] = $('#textarea1').val().substring(prev,nex); prev = nex; } }); } for(i = 0;i choices.length;i++){ $(#div1).append(p + choices[i] + /p); } }); -- View this message in context:http://old.nabble.com/Help-needed-with-textarea.-tp26991838s27240p269... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jquery sortable question
jQuery core's method .index() would be a solution here's an example: http://jsbin.com/ozoda/edit On Jan 2, 12:17 am, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I'm using the sortable plugin with JQuery 1.3. After a list item has been moved to a new place, how do you get the new list item position -- i.e. it's now the 1st, 2nd, 3rd ... item in the list as opposed to its position on the screen? Here's how I'm declaring my sortable list ... $(#sortable).sortable({ revert: true, handle : '.adminPrinterHeader', update : function (event, ui) { /* What goes here? */ } }); // Thanks, - Dave
[jQuery] Re: Anchor Child Not Responding to Hover
You mean this? http://vidasp.net/jquery-example5.html
[jQuery] jquery too long to load
I've created a webpage, its just a test sample, but i'm having a problem. It seems that jquery is taking too long to load, but I could be wrong. What happens is when I load the page the drop down menu shows until the page is completely loaded then it disappears which is how it should look from the beginning. Below is the link to the page, if anyone can help that would be great. Thanks in advance. http://attilio.site50.net/fakebizz/index.html
[jQuery] Re: jquery too long to load
Well, it depends from which URL your're loading from... this one shoud be pretty fast: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js Consider hiding the dropdown with CSS... hidden *is* the default state for it, anyway.
[jQuery] Re: jquery too long to load
that's exactly where i'm loading it from even though i can hide it using CSS the animations still take a few seconds to load which isn't good in my opinion
RE: [jQuery] css editor with jquery
Very interesting work, Alfredo! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of orazio.nelson Sent: Saturday, January 02, 2010 9:26 AM To: jQuery (English) Subject: [jQuery] css editor with jquery Hello, i made a proof of concept about a css editor made with jquery. You can see and download it from: http://tt4fn.netsons.org/fonte Is possible to edit almost all the page, for each section there are 34 css customizable options. But now I've a trouble: how can I push the generated css and save it? Tnx Alfredo
[jQuery] Re: jquery too long to load
Well, it is kind of slow... I'm here on vacation so I don't have the tools (firefox plug-ins) to analyze the situation... first, install the HttpFox plug-in and then, look what HTTP requests are made, at what time, in what order, how long they take to be answered if you want your page to seem responsive, the big header image should get displayed as soon as possible (also, try to reduce its size as much as possible) also, time the JS code... var time1 = new Date().getTime(); // all the JS code that gets executed on page load var time2 = new Date().getTime(); alert(time2 - time1); the number should, of course, be as low as possible...
Re: [jQuery] Help with dynamicaly created table
You need to trigger the update event for the table for tablesorter to rebuild the cache. At the bottom of your .delete_button click function, add $(#shop_list).update(); and it should fix your problems. For more information, please see http://tablesorter.com/docs/example-ajax.html. aquaone On Fri, Jan 1, 2010 at 18:18, Jahvi javie...@gmail.com wrote: Hi, Im currently using the tablesorter plugin to style a table im using, the code is the following: $(document).ready(function(){ $(#shop_list) .tablesorter({widthFixed: true, widgets: ['zebra'], headers: { 2: { sorter: false }, 3: { sorter: false } } }) .tablesorterPager({container: $(#pager)}); }); As you can see it applies the plugin to the table id 'shop_list' and works fine on page load, I also have buttons on each record of the table that deletes them: $('.delete_button').live('click', function() { var id = $(this).attr(id).split(_); var id_store= id[1]; jConfirm('Delete store?','Confirm', function(r) { if (r==true){ $('#async_div').load('store.async.php? async=4id_store='+id_store); //Delete store $('#table_div').load('store.async.php? async=1'); //Update Table } }); }); store.async.php contains all the php functions for that page and its working fine the problem is that when the table updates with the deleted record off the tableSorter plugin doesn't reapply. I've tried playing with the live function but I havent been able to make it work. Is there any way to do it? Or a better way to update the table without reloading it? Thanks in advance!
[jQuery] Re: css editor with jquery
How do you internally represent your edited data? I didn't read the entire fonte.js script, but this should probably be solved by a representing each editable areas as separate objects with different id's. Then serialize everything to a JSON-object and post it to your backend where you could save it into a database. I don't think that saving this into a cookie will be a good idea, since there's a 4kb limit on cookies. You will of course need to create an method that should be called on init that reads your saved data (inline object or by making an ajax requests) and recreates the page. This could be solved in a number of ways, but start with reading some posts about json and you'll be on your way. / Johan On Jan 2, 6:28 pm, Rick Faircloth r...@whitestonemedia.com wrote: Very interesting work, Alfredo! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of orazio.nelson Sent: Saturday, January 02, 2010 9:26 AM To: jQuery (English) Subject: [jQuery] css editor with jquery Hello, i made a proof of concept about a css editor made with jquery. You can see and download it from:http://tt4fn.netsons.org/fonte Is possible to edit almost all the page, for each section there are 34 css customizable options. But now I've a trouble: how can I push the generated css and save it? Tnx Alfredo
[jQuery] Re: jquery too long to load
Looks to me like the www.000webhost.com analytics code is what is slowing the process, not the loading of jQuery. I got waiting for attilio.site50.net and/or www.000webhost.com messages from your site. As I'm sure you know jQuery waits for the entire page to load before it is enacted hence the $(document).ready(function(). I would guess that your host is putting that script at the bottom of your page...otherwise loose it or add it to the $(document).ready (function() call. As Šime Vidas stated use css to hide the drop-downs. In fact you can use css to produce the drop-down menu with a layer of jquery to provide the fade in/out effects. Here are a few pure CSS drop-down menu examples: http://www.sohtanaka.com/web-design/examples/drop-down-menu/ http://www.cssplay.co.uk/menus/final_drop.html http://www.projectseven.com/tutorials/navigation/auto_hide/workpage.htm Otherwise I do like the effects you came up with on the navigation.
Re: [jQuery] Re: jquery too long to load
Looks to me like the www.000webhost.com analytics code is what is slowing the process, not the loading of jQuery. I got waiting for attilio.site50.net and/or www.000webhost.com messages from your site. As I'm sure you know jQuery waits for the entire page to load before it is enacted hence the $(document).ready(function(). I would guess that your host is putting that script at the bottom of your page...otherwise loose it or add it to the $(document).ready(function() call. As Šime Vidas stated use css to hide the drop-downs. In fact you can use css to produce the drop-down menu with a layer of jquery to provide the fade in/out effects. Here are a few pure CSS drop-down menu examples: http://www.sohtanaka.com/web-design/examples/drop-down-menu/ http://www.cssplay.co.uk/menus/final_drop.html http://www.projectseven.com/tutorials/navigation/auto_hide/workpage.htm Otherwise I do like the effects you came up with on the navigation. Corey camwebdesign.com On Sat, Jan 2, 2010 at 12:12 PM, attilio hawkw...@gmail.com wrote: that's exactly where i'm loading it from even though i can hide it using CSS the animations still take a few seconds to load which isn't good in my opinion
[jQuery] How to check whether an element is bound to an event or not?
I need to check whether an element is bound to an event or not. How to achieve this?
[jQuery] Autocomplete
Hi, I am new to jQuery and have 2 questions: I am using the bassistance.de jQuery plug-in. 1. For speed I have created my Array of data to be searched client side in a .js file as I have 25k + items. In Firefox and IE8 the auto prompt is very fast - however in for some clients it is not - for example some using IE7. How can I speed up the load process? 2. My data can have multiple words for one entry that must be separated by a comma. For example: array [ Item 1, Item 2, Item, value3... ]; When my clients type in the autocomplete field I need the comma to be ignored, so for example: If they type 'Item va' I need 'Item, value3' to be returned in the autocomplete prompt list. At the moment clients have to type 'Item, va' to see 'Item, value3' in the autocomplete prompt list. How can I handle this. Thanks for your help. Andrew
Re: [jQuery] Autocomplete
i would suggest you check out jQuery UI On Sat, Jan 2, 2010 at 9:35 PM, AndrewM amer...@amwebright.com wrote: Hi, I am new to jQuery and have 2 questions: I am using the bassistance.de jQuery plug-in. 1. For speed I have created my Array of data to be searched client side in a .js file as I have 25k + items. In Firefox and IE8 the auto prompt is very fast - however in for some clients it is not - for example some using IE7. How can I speed up the load process? 2. My data can have multiple words for one entry that must be separated by a comma. For example: array [ Item 1, Item 2, Item, value3... ]; When my clients type in the autocomplete field I need the comma to be ignored, so for example: If they type 'Item va' I need 'Item, value3' to be returned in the autocomplete prompt list. At the moment clients have to type 'Item, va' to see 'Item, value3' in the autocomplete prompt list. How can I handle this. Thanks for your help. Andrew
Re: [jQuery] How to check whether an element is bound to an event or not?
usually when I bind a click event I do this. unbind before bind $(elm).unbind('click'); $(elm).bind(click, function() { }); may be a modification like this if(!$(elm).unbind('click')) { $(elm).bind(click, function() { alert(This element was only bound if it was not bound); }); } On Sat, Jan 2, 2010 at 7:28 PM, ranacseruet ranacser...@gmail.com wrote: I need to check whether an element is bound to an event or not. How to achieve this?
Re: [jQuery] $.ajax - different results in Chrome and Safari.
On Sat, Jan 2, 2010 at 1:13 AM, bookmarc mmelc...@gmail.com wrote: The following code gives a a parser error in Google Chrome and Firefox but seems to work in Safari. Can anyone see what I am doing wrong or understand why this is happening? I see a couple things that make me wonder: header ... /header Maybe this was just a transcription oops, but drop the ers. diagnostics: false True booleans shouldn't have quotes around them, though it could be your server wants them in string form for some reason, I suppose. Good luck. Nathan
[jQuery] Re: simplemodal next/back functionality
I had time to play around with it more and narrowed it down to the onClose function... this works: onClose: function (dialog) { jQuery.modal.close(); } this doesn't: onClose: function (dialog) { dialog.data.fadeOut(300); dialog.container.fadeOut(100); dialog.overlay.fadeOut(300, function () { jQuery.modal.close(); }); } but why does this happen and how can i get around it? can i set a timeout on the automated modal open (when clicking previous or next) equal or greater to the time it takes to close the modal? or is there a better way? any help is appreciated! On Dec 31 2009, 9:53 pm, nevgenevich nevgenev...@gmail.com wrote: I played around with it, taking it step by step closer to my code until i hit an issue, and narrowed it down to modal effects... below is my change to full effects that i'm using for my project, ignore the jQuery vs $, its my way of avoiding certain conflicts when i remove all these effects from my code the previous/next work, but i need the effects to remain any ideas on why they could be causing an issue (timing?) or how to make it work? jQuery('a.Foo').each(function() { jQuery(this).click(function() { jQuery('#modal_' + this.id).modal({ overlayClose:true, onOpen: function (dialog) { dialog.overlay.fadeIn(300); dialog.container.fadeIn(100); dialog.data.fadeIn(300); }, onClose: function (dialog) { dialog.data.fadeOut(300); dialog.container.fadeOut(100); dialog.overlay.fadeOut(300, function () { jQuery.modal.close(); }); }, closeHTML:'a href=#Back/a', minHeight:540, minWidth:940, maxHeight:540, maxWidth:940, opacity:60 }); }); }); On Dec 31, 12:37 pm, brian zijn.digi...@gmail.com wrote: On Thu, Dec 31, 2009 at 2:13 AM, nevgenevich nevgenev...@gmail.com wrote: it generates the link properly, when clicking on it: it closes the modal but does nothing else. i can verify with a console.log that it gets to after the call to open the previous modal, but it doesnt open anything. checked to make sure it was generating the modal link correctly too (ie calling the correct id) It works fine for me. Here's the full page I used to test: !DOCTYPE html html head title/title link rel=Stylesheet href=http://yui.yahooapis.com/3.0.0/build/cssreset/reset-min.css; / style body { padding: 100px; } div.Bar { display: none; } /style script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js;/script script src=jquery.simplemodal-1.3.3.min.js/script script $(function() { $('a.Foo').each(function() { $(this).click(function() { $('#modal_' + this.id).modal({overlayClose:true}); }); }); var num_divs = $('div.Bar').length; $('div.Bar').each(function(i) { /* if there is a previous div add a link to it */ if (i 0) { /* get the ID for previous div */ var prev_id = $(this).prev('.Bar').attr('id'); /* add the link with click event */ $('a href=# class=Prevprevious/a') .click(function() { $.modal.close(); $('#' + prev_id).modal({overlayClose:true}); }) .appendTo($(this)); } /* if there is a next div add a link to it */ if (i num_divs - 1) { /* get the ID for next div */ var next_id = $(this).next('.Bar').attr('id'); /* add the link with click event */ $('a href=# class=Nextnext/a') .click(function()
[jQuery] Re: jquery too long to load
the000webhost.com analytics code was definitely the problem, i disabled it and everything is working fine now, thanks!!!
[jQuery] Select with different fonts for each element
I have a select where a user selects a font (style) and it is applied to text on the page. What I am after is if there is a way via plugin etc where the dropdown will have the style applied to each row. I am after something like a font menu in MS Word buy using web fonts. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Select with different fonts for each element
I made it work in Firefox, but in IE it seems impossible to style each OPTION element individually, same problem in Chrome But, I have an idea... give me a minute :)
[jQuery] simple jquery question
Hey, was wondering if anyone could help me with a basic JQ question. Ok so I am trying to select each element that has a certain class on my page, and then use what is inside of the h3 class=example I am selecting to populate a drop down select box with the id of deptFilter. (with each result found inside of the H3, wrapped in option tags.) I am having trouble understanding how I actually store the variables found in each H3 with the class of example. Any help would be greatly appreciated.
[jQuery] Animate or ToggleClass
Hi. I'm new to jQuery and ran into this dilemma. In the portfolio section of my homepage ( http://invitro.vegasoftweb.com/es/ ). I have a div with 9 items but only 3 are showing, the other 6 are hidden by another div that has a fixed height and thus clip them. I am trying to implement a soft transition when a + button is clicked and the hidden 6 are visible. I tried this two ways: 1. Toggling classes between the clipdiv and the fulldiv and adding a duration value for toggleClass. However the transition doesn't work in IE var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').toggleClass('portfoliofull', 2000); return false; }); 2. trying the Animate - toggle height but I can't get it to work with a starting height so it goes from showing the 3 items to not showing anything, instead of opening and revealing the hidden 6. var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').animate({height: auto}); return false; }); Also, tried the Animate height and it does work but it doesn't toggle, meaning you can only do it once and it won't return to smaller. var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').animate({height:toggle}, 5000); return false; }); Any help would be highly appreciated. Thanks!
Re: [jQuery] Select with different fonts for each element
This is basically the select in question. select name=line1font onchange=changeFont(this,1); option value=Arial, Helvetica, sans-serifArial/option option value='Arial Black', 'Arial Black', Gadget, sans-serifArial Black/option option value='Comic Sans MS', cursiveComic Sans/option option value='Courier New', 'Courier New', Courier, monospaceCourier New/option option value=Georgia, serifGeorgia/option option value=Impact, Charcoal, sans-serifImpact/option option value='Lucida Console', Monaco, monospaceLucida Console/option option value='Lucida Sans Unicode', 'Lucida Grande', sans-serifLucida Sans Unicode/option option value='Palatino Linotype', 'Book Antiqua', Palatino, serifPalatino/option option value=Tahoma, Geneva, sans-serifTahoma/option option value='Times New Roman', Times, serifTimes New Roman/option option value='Trebuchet MS', Helvetica, sans-serifTrebuchet MS/option option value=Verdana, Geneva, sans-serifVerdana/option option value='MS Sans Serif', Geneva, sans-serifMS Sans Serif/option option value='MS Serif', 'New York', serifMS Serif/option /select I didn't know if a plugin existed that could take the value and apply it as a style to the elements of the select somehow. Thanks Steffan From: Steffan Cline stef...@hldns.com Reply-To: jquery-en@googlegroups.com Date: Sat, 02 Jan 2010 14:07:36 -0700 To: jquery-en@googlegroups.com jquery-en@googlegroups.com Subject: [jQuery] Select with different fonts for each element I have a select where a user selects a font (style) and it is applied to text on the page. What I am after is if there is a way via plugin etc where the dropdown will have the style applied to each row. I am after something like a font menu in MS Word buy using web fonts. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Table striping still not working in IE7
I've tried :odd, :even, and :nth-child. They work fine in IE8 but not in IE7 (using compatibility mode to check). Is this common or something I have to figure out? I'm just striping a table at http://celestialchurchqueens.org with: $('tr:nth-child(even)').addClass('alt'); I temporarily tried loading jQuery 1.3.1 instead of 1.3.2 but that didn't fix the problem. Works fine in FF, Opera and Chrome of course. IE is the problem, as usual. I hate to go much farther with jQuery when a simple effect won't work in what is still the most common browser (unfortunately) Is there an alternate way of doing this that will work in IE7. And of course, if IE7 won't support simple striping, is it going to support moving things and animation?
Re: [jQuery] Table striping still not working in IE7
Just an off the hip thought, IE7 may still have the pseudo issues in IE6 and earlier... Corey camwebdesign.com On Sat, Jan 2, 2010 at 5:16 PM, cybervigilante cybervigila...@gmail.comwrote: I've tried :odd, :even, and :nth-child. They work fine in IE8 but not in IE7 (using compatibility mode to check). Is this common or something I have to figure out? I'm just striping a table at http://celestialchurchqueens.org with: $('tr:nth-child(even)').addClass('alt'); I temporarily tried loading jQuery 1.3.1 instead of 1.3.2 but that didn't fix the problem. Works fine in FF, Opera and Chrome of course. IE is the problem, as usual. I hate to go much farther with jQuery when a simple effect won't work in what is still the most common browser (unfortunately) Is there an alternate way of doing this that will work in IE7. And of course, if IE7 won't support simple striping, is it going to support moving things and animation?
[jQuery] Re: Table striping still not working in IE7
Just an off the hip thought, IE7 may still have the pseudo issues in IE6 and earlier... http://vidasp.net/Internet%20Explorer%20and%20CSS.txt
[jQuery] Re: simplemodal next/back functionality
in case others have the same issue, i guessed the problem in the last post... adding a setTimeout(function() { before the call to modal, set for more than the time of closing the previous modal, makes it work. interestingly enough, setting a timeout value less than total closing time but greater than 0 works intermittently, and seems to work more often the closer it is to total closing time (ie, if closing time is 700 total, setting 710 works always, 610 works 9 out of 10 times, 410 works 5 out of 10 times, according to my quick testing) so it looks like a sort of 'race condition' is involved thanks again to brian for the working example (i wouldn't have thought of using next and prev selectors via jquery)! :) On Jan 2, 3:26 pm, nevgenevich nevgenev...@gmail.com wrote: I had time to play around with it more and narrowed it down to the onClose function... this works: onClose: function (dialog) { jQuery.modal.close(); } this doesn't: onClose: function (dialog) { dialog.data.fadeOut(300); dialog.container.fadeOut(100); dialog.overlay.fadeOut(300, function () { jQuery.modal.close(); }); } but why does this happen and how can i get around it? can i set a timeout on the automated modal open (when clicking previous or next) equal or greater to the time it takes to close the modal? or is there a better way? any help is appreciated! On Dec 31 2009, 9:53 pm, nevgenevich nevgenev...@gmail.com wrote: I played around with it, taking it step by step closer to my code until i hit an issue, and narrowed it down to modal effects... below is my change to full effects that i'm using for my project, ignore the jQuery vs $, its my way of avoiding certain conflicts when i remove all these effects from my code the previous/next work, but i need the effects to remain any ideas on why they could be causing an issue (timing?) or how to make it work? jQuery('a.Foo').each(function() { jQuery(this).click(function() { jQuery('#modal_' + this.id).modal({ overlayClose:true, onOpen: function (dialog) { dialog.overlay.fadeIn(300); dialog.container.fadeIn(100); dialog.data.fadeIn(300); }, onClose: function (dialog) { dialog.data.fadeOut(300); dialog.container.fadeOut(100); dialog.overlay.fadeOut(300, function () { jQuery.modal.close(); }); }, closeHTML:'a href=#Back/a', minHeight:540, minWidth:940, maxHeight:540, maxWidth:940, opacity:60 }); }); }); On Dec 31, 12:37 pm, brian zijn.digi...@gmail.com wrote: On Thu, Dec 31, 2009 at 2:13 AM, nevgenevich nevgenev...@gmail.com wrote: it generates the link properly, when clicking on it: it closes the modal but does nothing else. i can verify with a console.log that it gets to after the call to open the previous modal, but it doesnt open anything. checked to make sure it was generating the modal link correctly too (ie calling the correct id) It works fine for me. Here's the full page I used to test: !DOCTYPE html html head title/title link rel=Stylesheet href=http://yui.yahooapis.com/3.0.0/build/cssreset/reset-min.css; / style body { padding: 100px; } div.Bar { display: none; } /style script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js;/script script src=jquery.simplemodal-1.3.3.min.js/script script $(function() { $('a.Foo').each(function() { $(this).click(function() { $('#modal_' + this.id).modal({overlayClose:true}); }); }); var num_divs = $('div.Bar').length; $('div.Bar').each(function(i) { /* if there is a previous div add a link to it */ if (i 0) { /* get the ID for previous div */ var prev_id = $(this).prev('.Bar').attr('id'); /* add the link with click event */ $('a href=#
Re: [jQuery] Re: Select with different fonts for each element
Well, this was the closest. It sounds like what you tried. Maybe his div overlay is the only option. http://fullfatcode.wordpress.com/2009/06/05/a-simple-jquery-font-chooser-plu gin/ Thanks Steffan From: Šime Vidas sime.vi...@gmail.com Reply-To: jquery-en@googlegroups.com Date: Sat, 2 Jan 2010 13:42:05 -0800 (PST) To: jQuery (English) jquery-en@googlegroups.com Subject: [jQuery] Re: Select with different fonts for each element I made it work in Firefox, but in IE it seems impossible to style each OPTION element individually, same problem in Chrome But, I have an idea... give me a minute :)
Re: [jQuery] Animate or ToggleClass
lets say I have this HTML CSS markup . extendcontent { display:none; } div class=extender a href=# class=extend+/aa class=extend href=#Click to extend/a div // all your extend content goes here div class=extendcontent This is div #1 of extended content /div div This is div #2 of extended content /div div This is div #3 of extended content /div /div /div now heres the script var $s = jQuery.noConflict(); $s(function() { var obj_extend = $s(. extender); var btn_extend = $s(. extend, obj_extend); btn_extend .click(function(e) { e.preventDefault(); btn_extend.next().show(); }); }); On Sat, Jan 2, 2010 at 9:38 PM, Once busetolo...@gmail.com wrote: Hi. I'm new to jQuery and ran into this dilemma. In the portfolio section of my homepage ( http://invitro.vegasoftweb.com/es/ ). I have a div with 9 items but only 3 are showing, the other 6 are hidden by another div that has a fixed height and thus clip them. I am trying to implement a soft transition when a + button is clicked and the hidden 6 are visible. I tried this two ways: 1. Toggling classes between the clipdiv and the fulldiv and adding a duration value for toggleClass. However the transition doesn't work in IE var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').toggleClass('portfoliofull', 2000); return false; }); 2. trying the Animate - toggle height but I can't get it to work with a starting height so it goes from showing the 3 items to not showing anything, instead of opening and revealing the hidden 6. var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').animate({height: auto}); return false; }); Also, tried the Animate height and it does work but it doesn't toggle, meaning you can only do it once and it won't return to smaller. var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').animate({height:toggle}, 5000); return false; }); Any help would be highly appreciated. Thanks!
[jQuery] Re: Select with different fonts for each element
OK, this is it :) We can call this version alpha 0.1... the code is super-messy, and it most certanly won't work if you just copy-paste it... but this example actually works in all browsers... http://vidasp.net/jquery-example6.html
Re: [jQuery] Re: Select with different fonts for each element
Wow. That was quick and VERY cool. Think you'll package that into a plugin architecture? Simply, WOW! Thanks Steffan From: Šime Vidas sime.vi...@gmail.com Reply-To: jquery-en@googlegroups.com Date: Sat, 2 Jan 2010 14:59:34 -0800 (PST) To: jQuery (English) jquery-en@googlegroups.com Subject: [jQuery] Re: Select with different fonts for each element OK, this is it :) We can call this version alpha 0.1... the code is super-messy, and it most certanly won't work if you just copy-paste it... but this example actually works in all browsers... http://vidasp.net/jquery-example6.html
[jQuery] Re: Table striping still not working in IE7
On Jan 2, 3:22 pm, audiofreak9 audiofre...@gmail.com wrote: Just an off the hip thought, IE7 may still have the pseudo issues in IE6 and earlier... I thought jQuery had its own model, so it can use stuff that isn't even in IE7, like some CSS3 selectors. Anyway, I can't even seem to get non-pseudo stuff to work. I'm using Joomla, but I don't think it's Joomla since it Does work in IE8
[jQuery] Re: Select with different fonts for each element
I had to go play cards with my cousin, so i left the code messy... it has several bugs for now (try hovering over the list and then hovering out without clicking any item)... It should take my 30 minutes to refactor the code and kill the bugs...
Re: [jQuery] Re: Select with different fonts for each element
Sweet! I'll be watching for it! Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- From: Šime Vidas sime.vi...@gmail.com Reply-To: jquery-en@googlegroups.com Date: Sat, 2 Jan 2010 15:34:30 -0800 (PST) To: jQuery (English) jquery-en@googlegroups.com Subject: [jQuery] Re: Select with different fonts for each element I had to go play cards with my cousin, so i left the code messy... it has several bugs for now (try hovering over the list and then hovering out without clicking any item)... It should take my 30 minutes to refactor the code and kill the bugs...
Re: [jQuery] Re: Table striping still not working in IE7
jQuery does have its own selector engine that is used in *jQuery selectors*. However, it does not add any capabilities that are not already there in *CSS selectors*. This is a jQuery selector: $('.foobar').whatever(); This is a CSS selector: style type=text/css .foobar { whatever } /style In your code you are using *CSS selectors*. You're using jQuery to add a class to some elements, and then you are using a CSS selector to do something with that class. In this situation, jQuery doesn't add anything beyond what the native CSS selector engine provides, because the CSS selector is not interpreted by jQuery. Your jQuery code is working fine. If you load your page in IE8, then hit F12 and choose IE7 mode, you'll see that it fails to stripe your table. However, if you then use the DOM inspector in IE8 to look at your table elements, you'll see that they do have the 'alt' class that you're adding. This is all working perfectly. In fact, if you didn't use jQuery at all, but generated the HTML code from your server with the 'alt' class on alternate rows, I'm sure you would see exactly the same result in all browsers that you see now. This suggests another way to approach the problem. For test purposes, don't use jQuery at all. Simply hand-code a simple HTML page that has all of the CSS classes you want to use. Then you can fiddle with your HTML and CSS all you want, without having to worry about whether the problem lies in jQuery or elsewhere. Did you see my reply to your other post, where I mentioned that Karl had pointed out that you can't set the background color of a TR in IE6, but have to set it on the TD elements instead? I wonder if IE7 has the same problem. In any case, that's where you should begin investigating. Along the same lines, if you wonder whether your jQuery code is working as expected, do not rely simply on the visual effect. Use the DOM inspector and see if your DOM elements have the attributes you expect. Then you'll know where to continue troubleshooting. -Mike On Sat, Jan 2, 2010 at 3:14 PM, cybervigilante cybervigila...@gmail.comwrote: On Jan 2, 3:22 pm, audiofreak9 audiofre...@gmail.com wrote: Just an off the hip thought, IE7 may still have the pseudo issues in IE6 and earlier... I thought jQuery had its own model, so it can use stuff that isn't even in IE7, like some CSS3 selectors. Anyway, I can't even seem to get non-pseudo stuff to work. I'm using Joomla, but I don't think it's Joomla since it Does work in IE8
[jQuery] Re: Select with different fonts for each element
Done! http://vidasp.net/jquery-example6.html
[jQuery] Formatting long chains of jQuery code
Is there a prefered way of formatting jQuery code when you have 5 or more chained methods? I came up with this... http://vidasp.net/jquery-example6.html (look at the code at the bottom of the source) ... how do you format it?
[jQuery] How do I extract this value?
Hi, I am using JQuery 1.3. I have this basic structure in my HTML ... li id=myid ... a class=edit href=javascript:edit(1234) ... /a ... /li How do I extract the 1234 from HTML assuming I know the id of the li element? Thanks, - Dave ps - I know its bad practice to have the javascript function in there, but sadly this is code I inherited and I can't change the href at this point.
[jQuery] Re: Formatting long chains of jQuery code
I would guess preferred = however someone wants to do it as long as it works what you have is perfectly fine.. and bonus points for it working :-) On Jan 2, 9:03 pm, Šime Vidas sime.vi...@gmail.com wrote: Is there a prefered way of formatting jQuery code when you have 5 or more chained methods? I came up with this...http://vidasp.net/jquery-example6.html (look at the code at the bottom of the source) ... how do you format it?
[jQuery] Re: How do I extract this value?
var hit = $(#myid).find(a).attr(href).match(/^.+\((\d+)\)$/); if (hit hit.length == 2) { // hit[1] = 1234 in the example you provided } else { // didn't find the value } On Jan 2, 9:13 pm, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I am using JQuery 1.3. I have this basic structure in my HTML ... li id=myid ... a class=edit href=javascript:edit(1234) ... /a ... /li How do I extract the 1234 from HTML assuming I know the id of the li element? Thanks, - Dave ps - I know its bad practice to have the javascript function in there, but sadly this is code I inherited and I can't change the href at this point.
[jQuery] Re: How do I extract this value?
Perfect! 5 stars - Dave On Jan 2, 8:15 pm, MorningZ morni...@gmail.com wrote: var hit = $(#myid).find(a).attr(href).match(/^.+\((\d+)\)$/); if (hit hit.length == 2) { // hit[1] = 1234 in the example you provided} else { // didn't find the value } On Jan 2, 9:13 pm, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I am using JQuery 1.3. I have this basic structure in my HTML ... li id=myid ... a class=edit href=javascript:edit(1234) ... /a ... /li How do I extract the 1234 from HTML assuming I know the id of the li element? Thanks, - Dave ps - I know its bad practice to have the javascript function in there, but sadly this is code I inherited and I can't change the href at this point.
[jQuery] Re: Animate or ToggleClass
Waseem, thanks for your answers. I tried to implement what you suggested but it seems the script only hides and show the .extendedcontent container. Since the portfolio also has a small script that filters the item depending on the category (web, print, branding), all the items have to be in the same div, so putting some in one div and the others in the hidden .extendencontent would break the filtering... If you take a look, you can see what I mean http://invitro.vegasoftweb.com/es/ under Proyectos Recientes. I believe there is a way to toggle the height and animate the effect with a starting height, so it goes from that specific height to a full height, thus showing the first three items to the total nine. I just don't know how to write the code to do that since I couldn't find where to put a starting height value for that... On 2 ene, 17:49, waseem sabjee waseemsab...@gmail.com wrote: lets say I have this HTML CSS markup . extendcontent { display:none; } div class=extender a href=# class=extend+/aa class=extend href=#Click to extend/a div // all your extend content goes here div class=extendcontent This is div #1 of extended content /div div This is div #2 of extended content /div div This is div #3 of extended content /div /div /div now heres the script var $s = jQuery.noConflict(); $s(function() { var obj_extend = $s(. extender); var btn_extend = $s(. extend, obj_extend); btn_extend .click(function(e) { e.preventDefault(); btn_extend.next().show(); }); }); On Sat, Jan 2, 2010 at 9:38 PM, Once busetolo...@gmail.com wrote: Hi. I'm new to jQuery and ran into this dilemma. In the portfolio section of my homepage (http://invitro.vegasoftweb.com/es/). I have a div with 9 items but only 3 are showing, the other 6 are hidden by another div that has a fixed height and thus clip them. I am trying to implement a soft transition when a + button is clicked and the hidden 6 are visible. I tried this two ways: 1. Toggling classes between the clipdiv and the fulldiv and adding a duration value for toggleClass. However the transition doesn't work in IE var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').toggleClass('portfoliofull', 2000); return false; }); 2. trying the Animate - toggle height but I can't get it to work with a starting height so it goes from showing the 3 items to not showing anything, instead of opening and revealing the hidden 6. var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').animate({height: auto}); return false; }); Also, tried the Animate height and it does work but it doesn't toggle, meaning you can only do it once and it won't return to smaller. var $s = jQuery.noConflict(); $s(document).ready(function() { $s('a#portfolio-morelink').click(function() { $s('.portfolioclip').animate({height:toggle}, 5000); return false; }); Any help would be highly appreciated. Thanks!
Re: [jQuery] How to check whether an element is bound to an event or not?
hi, thanks. But, what is happening here is: There is an DOM element, which is reloading(replaced by ajax response with same id/tag), then the event isn't no more bounded. I want it to be bounded all the time. Do you think, here unbound will work? Or Is there any way to keep the binding whenever a new element is being loaded? Regards On Sun, Jan 3, 2010 at 1:41 AM, waseem sabjee waseemsab...@gmail.comwrote: usually when I bind a click event I do this. unbind before bind $(elm).unbind('click'); $(elm).bind(click, function() { }); may be a modification like this if(!$(elm).unbind('click')) { $(elm).bind(click, function() { alert(This element was only bound if it was not bound); }); } On Sat, Jan 2, 2010 at 7:28 PM, ranacseruet ranacser...@gmail.com wrote: I need to check whether an element is bound to an event or not. How to achieve this? -- http://ranacseruet.blogspot.com/
[jQuery] Re: How to check whether an element is bound to an event or not?
Yes, the live function. http://docs.jquery.com/Events/live Added in jQuery 1.3: Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events. On Jan 2, 11:44 pm, Md. Ali Ahsan Rana ranacser...@gmail.com wrote: hi, thanks. But, what is happening here is: There is an DOM element, which is reloading(replaced by ajax response with same id/tag), then the event isn't no more bounded. I want it to be bounded all the time. Do you think, here unbound will work? Or Is there any way to keep the binding whenever a new element is being loaded? Regards On Sun, Jan 3, 2010 at 1:41 AM, waseem sabjee waseemsab...@gmail.comwrote: usually when I bind a click event I do this. unbind before bind $(elm).unbind('click'); $(elm).bind(click, function() { }); may be a modification like this if(!$(elm).unbind('click')) { $(elm).bind(click, function() { alert(This element was only bound if it was not bound); }); } On Sat, Jan 2, 2010 at 7:28 PM, ranacseruet ranacser...@gmail.com wrote: I need to check whether an element is bound to an event or not. How to achieve this? --http://ranacseruet.blogspot.com/
[jQuery] jquery.ckeditor non functional?
It can't get easier than this... 1) include the libraries 2) set up the forms ajax submit 3) call the ckeditor to set up. BUT... It doesn't set up the CKEditor ### script type=text/javascript src=../ckeditor/ckeditor.js/script script language=javascript type=text/javaScript src=../js/ jquery-1.3.2.min.js/script script src='../js/jquery.MetaData.js' type=text/javascript language=javascript/script script language=javascript type=text/javaScript src=../js/ jquery.form.js/script script language=javascript type=text/javaScript src=../js/ jquery.CKEditor.js/script $(document).ready(function() { var options = { target:'#output1', // target element(s) to be updated with server response beforeSubmit: showRequest, // pre-submit callback success: showResponse, // post-submit callback url: 'a_program.php', // override for form's 'action' attribute type: 'post'// 'get' or 'post', override for form's 'method' attribute }; // bind form using 'ajaxForm' $('#btn-ajax').click(function(){ $('#form1').ajaxSubmit(options); }); }); var CKEDITOR_BASEPATH = 'http://www.domain.com/ckeditor/'; $(function(){ $.ckeditor.config = {skin: 'kama' }; // initialize $('textarea.cke1').ckeditor(); }); /script form method=post id=form1 pbMessage/b textarea cols=80 class=cke1 id=editor_kama name=editor_kama rows=10Hi, this is your editor area. /textarea /form div class=Clear input id=btn-ajax type=button value=Test raquo; style=float:right/ /div ### Now, I can get the CKEditor to set up IF I add the following... CKEDITOR.replace({skin: 'kama' }) But then it doesn't plug into the forms processing (as all I get back is the text from the html and not the underlying HTML from the editor. In other words, if I turn Hi, this is your editor area. bold I would expect to get back strongHi, this is your editor area./strong but only the text is returned, not the HTML) My hope was that jquery.ckeditor would allow the form with ajax to function. Has anyone got it working as the documentation leaves much to be desired.
Re: [jQuery] Re: How to check whether an element is bound to an event or not?
Hi, Thanks for your reply. It helped me a lot. Regards