[jQuery] Auto link key words and phrases
Hi Team, I would like to put together a basic tagging system in Adobe Business Catalyst. I need to be able to define: If keyword / phrase appears in #id make wrap a following href X around it. So I would define a list of key phrases that may appear in the #id and the links to add to them. I hope this makes sense. Thanks in advance for your help. Jackson
[jQuery] Re: css based on url wildcard
Hi Michael, Thanks so much for taking the time to reply. I have very limited Javascript knowledge (learning). Are you able to offer any more clues to get me on track? Thanks in advance for your help!. Jack On Nov 9, 4:32 pm, Michel Belleville michel.bellevi...@gmail.com wrote: Straight js : window.location.url contains current url. jQuery : $('#id_of_element').addClass('class') selects and element with the id 'id_of_element' and adds the class 'class'. I'll let you add the if and write the regexp (straight JS). Michel Belleville 2009/11/9 Wacko Jacko jackson.be...@gmail.com Hi All, Just wondering if there is a way with jQuery of adding css to an id based on a url wildcard? Eg, if the current url contains 'BlogRetrieve.aspx' add .class to this #id. Thanks in advance for your help. Jackson
[jQuery] css based on url wildcard
Hi All, Just wondering if there is a way with jQuery of adding css to an id based on a url wildcard? Eg, if the current url contains 'BlogRetrieve.aspx' add .class to this #id. Thanks in advance for your help. Jackson
[jQuery] Named Anchor Index from Headings
Hi! Would like to automatically generate an 'Anchor' index at the top of the page like this: http://www.beausmith.com/mt/2009/07/heading-anchors-via-jquery.php Just wondering if anyone has used this and if there is a simpler way / better method? Thanks, Jackson
[jQuery] Re: Hide row if empty
Thanks Bohdan. Tried that first. No luck. As I said, it will work if the parent is a div, but not if the parent of the div is an li. Thanks again. Jack On Oct 8, 5:56 pm, Bohdan Ganicky bohdan.gani...@gmail.com wrote: Hi, use .parent() instead of .parents() http://jsbin.com/isasi/ -- Bohdan On Oct 8, 6:17 am, Wacko Jacko jackson.be...@gmail.com wrote: I am having a bit of trouble with this one. Thanks for your help. I could get it working if the parent is a div but not if it's an li. Here's my html: ul class=member-table li divstrongWhy I am involved:/strong/div div class=answer{tag_why are you involved?}/div /li li divstrongCurrent projects activities:/strong/div div class=answer{tag_current projects}/div /li li divstrongMy relevant experience:/strong/div div class=answer{tag_relevant experience}/div /li /ul Here's my jQuery: $('.answer').each(function() { if ($(this).text() == ) { $(this).parents().hide(); } }); You said to add ('ul .answer') but this does not seem to make any difference. I really appreciate your help on this. Jack On Oct 1, 3:34 pm, Wacko Jacko jackson.be...@gmail.com wrote: Brilliant! I will try this and get back to you.Thanks for your time! On Oct 1, 3:21 pm, Charlie Griefer charlie.grie...@gmail.com wrote: Assuming you can turn those id's into classes (where you have id=database)... you can do the following: $(document).ready(function(){ $('ul .database').each(function() { if ($(this).text() == ) { $(this).parent().hide(); } }); }); On Wed, Sep 30, 2009 at 10:14 PM, Charlie Griefer charlie.grie...@gmail.com wrote: If you're working with server side data like that, couldn't you just write a conditional in whatever language you're using (PHP, CF, ASP, etc) to not display the li if no data? Also, do you really mean to re-use database as an ID for multiple elements? ID's ought to be unique. On Wed, Sep 30, 2009 at 9:43 PM, Wacko Jacko jackson.be...@gmail.comwrote: Hi All, If I had a list displaying data as follows: ul li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li /ul Could I hide the whole li id=item/li if their is nothing available to show from the database in div id=database ? Thanks in advance for your help Jack -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. -- Charlie Grieferhttp://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Re: Hide row if empty
Hi There. Yeah, just did. Thanks for that! Why does my test using the same code not work :( http://www.noosabiosphere.org.au/tester.htm On Oct 9, 8:46 am, Charlie charlie...@gmail.com wrote: did you look at the working example on jsbin where the li is being hidden? Wacko Jacko wrote:Thanks Bohdan. Tried that first. No luck. As I said, it will work if the parent is a div, but not if the parent of the div is an li. Thanks again. Jack On Oct 8, 5:56 pm, Bohdan Ganickybohdan.gani...@gmail.comwrote:Hi, use .parent() instead of .parents()http://jsbin.com/isasi/-- Bohdan On Oct 8, 6:17 am, Wacko Jackojackson.be...@gmail.comwrote:I am having a bit of trouble with this one. Thanks for your help. I could get it working if the parent is a div but not if it's an li.Here's my html:ul class=member-table li divstrongWhy I am involved:/strong/div div class=answer{tag_why are you involved?}/div /li li divstrongCurrent projects activities:/strong/div div class=answer{tag_current projects}/div /li li divstrongMy relevant experience:/strong/div div class=answer{tag_relevant experience}/div /li /ulHere's my jQuery:$('.answer').each(function() { if ($(this).text() == ) { $(this).parents().hide(); }});You said to add ('ul .answer') but this does not seem to make any difference. I really appreciate your help on this.JackOn Oct 1, 3:34 pm, Wacko Jackojackson.be...@gmail.comwrote:Brilliant! I will try this and get back to you.Thanks for your time!On Oct 1, 3:21 pm, Charlie Griefercharlie.grie...@gmail.comwrote:Assuming you can turn those id's into classes (where you have id=database)... you can do the following:$(document).ready(function(){ $('ul .database').each(function() { if ($(this).text() == ) { $(this).parent().hide(); } });});On Wed, Sep 30, 2009 at 10:14 PM, Charlie Griefer charlie.grie...@gmail.comwrote: If you're working with server side data like that, couldn't you just write a conditional in whatever language you're using (PHP, CF, ASP, etc) to not display the li if no data?Also, do you really mean to re-use database as an ID for multiple elements? ID's ought to be unique.On Wed, Sep 30, 2009 at 9:43 PM, Wacko Jackojackson.be...@gmail.comwrote:Hi All,If I had a list displaying data as follows:ul li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li /ulCould I hide the whole li id=item/li if their is nothing available to show from the database in div id=database ?... read more »
[jQuery] Re: Hide row if empty
I am having a bit of trouble with this one. Thanks for your help. I could get it working if the parent is a div but not if it's an li. Here's my html: ul class=member-table li divstrongWhy I am involved:/strong/div div class=answer{tag_why are you involved?}/div /li li divstrongCurrent projects activities:/strong/div div class=answer{tag_current projects}/div /li li divstrongMy relevant experience:/strong/div div class=answer{tag_relevant experience}/div /li /ul Here's my jQuery: $('.answer').each(function() { if ($(this).text() == ) { $(this).parents().hide(); } }); You said to add ('ul .answer') but this does not seem to make any difference. I really appreciate your help on this. Jack On Oct 1, 3:34 pm, Wacko Jacko jackson.be...@gmail.com wrote: Brilliant! I will try this and get back to you.Thanks for your time! On Oct 1, 3:21 pm, Charlie Griefer charlie.grie...@gmail.com wrote: Assuming you can turn those id's into classes (where you have id=database)... you can do the following: $(document).ready(function(){ $('ul .database').each(function() { if ($(this).text() == ) { $(this).parent().hide(); } }); }); On Wed, Sep 30, 2009 at 10:14 PM, Charlie Griefer charlie.grie...@gmail.com wrote: If you're working with server side data like that, couldn't you just write a conditional in whatever language you're using (PHP, CF, ASP, etc) to not display the li if no data? Also, do you really mean to re-use database as an ID for multiple elements? ID's ought to be unique. On Wed, Sep 30, 2009 at 9:43 PM, Wacko Jacko jackson.be...@gmail.comwrote: Hi All, If I had a list displaying data as follows: ul li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li /ul Could I hide the whole li id=item/li if their is nothing available to show from the database in div id=database ? Thanks in advance for your help Jack -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. -- Charlie Grieferhttp://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Hide row if empty
Hi All, If I had a list displaying data as follows: ul li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li /ul Could I hide the whole li id=item/li if their is nothing available to show from the database in div id=database ? Thanks in advance for your help Jack
[jQuery] Re: Hide row if empty
Hi Charlie, Thanks for your reply. I am using Business Catalyst (SaaS, hosted solution) so I can't do the php / ASP thang. I was using those id's only for reference purposes in this thread. Thanks. On Oct 1, 3:14 pm, Charlie Griefer charlie.grie...@gmail.com wrote: If you're working with server side data like that, couldn't you just write a conditional in whatever language you're using (PHP, CF, ASP, etc) to not display the li if no data? Also, do you really mean to re-use database as an ID for multiple elements? ID's ought to be unique. On Wed, Sep 30, 2009 at 9:43 PM, Wacko Jacko jackson.be...@gmail.comwrote: Hi All, If I had a list displaying data as follows: ul li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li /ul Could I hide the whole li id=item/li if their is nothing available to show from the database in div id=database ? Thanks in advance for your help Jack -- Charlie Grieferhttp://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Re: Hide row if empty
Brilliant! I will try this and get back to you.Thanks for your time! On Oct 1, 3:21 pm, Charlie Griefer charlie.grie...@gmail.com wrote: Assuming you can turn those id's into classes (where you have id=database)... you can do the following: $(document).ready(function(){ $('ul .database').each(function() { if ($(this).text() == ) { $(this).parent().hide(); } }); }); On Wed, Sep 30, 2009 at 10:14 PM, Charlie Griefer charlie.grie...@gmail.com wrote: If you're working with server side data like that, couldn't you just write a conditional in whatever language you're using (PHP, CF, ASP, etc) to not display the li if no data? Also, do you really mean to re-use database as an ID for multiple elements? ID's ought to be unique. On Wed, Sep 30, 2009 at 9:43 PM, Wacko Jacko jackson.be...@gmail.comwrote: Hi All, If I had a list displaying data as follows: ul li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li li id=itemdivLabel Here/divdiv id=database{content here if available from database}/div/li /ul Could I hide the whole li id=item/li if their is nothing available to show from the database in div id=database ? Thanks in advance for your help Jack -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. -- Charlie Grieferhttp://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Target specific ul list items for css
How would I target (with jQuery or normal javascript) the 5th and 6th li in an unsorted list for styling? I need to change the css for only 2 items in a list. Thanks in advance for your help.
[jQuery] Re: Target specific ul list items for css
Thanks guys! Paul's http://docs.jquery.com/Selectors/nthChild suggestion is perfect as the lists are generated dynamically I can not add id's to each item. On Jul 2, 11:14 am, Shiro nimro...@gmail.com wrote: Perhaps give each of them an ID? for example: ul lione/li litwo/li ... li id=fifthfifth/li li id=sixthsixth/li /ul Then you can target them by: $(#fifth) in jquery OR #fifth { } in CSS On Jul 1, 6:10 pm, Wacko Jacko jackson.be...@gmail.com wrote: How would I target (with jQuery or normal javascript) the 5th and 6th li in an unsorted list for styling? I need to change the css for only 2 items in a list. Thanks in advance for your help.
[jQuery] Re: Toggle child elements
Ok, thank. I understand this. What I am asking however is how I can accomplish what I am after? Any ideas? I would like for this div and the list inside of it to slide down / tween down into position together. On Jan 23, 9:52 am, donb falconwatc...@comcast.net wrote: The example doesn't 'slide' it has a fixed top position. The height of the container increases from zero to some value, gradually revealing the contents - much as if you are opening a sliding door. On Jan 22, 6:05 pm, Wacko Jacko jackson.be...@gmail.com wrote: Anyone? Am a barking up the wrong tree? On Jan 12, 10:48 am, Wacko Jacko jackson.be...@gmail.com wrote: Hi donb, It sounds like you know much more than I do. I am still quite new to jQuery. Can you point me in the right direction to have these elements slide in (down)? Thanks in advance for your help. Jackson On Jan 8, 2:01 pm, donb falconwatc...@comcast.net wrote: Ddoesn't the animation actually consist of an expanding div - meaning, the contents (and the outermost div) are fixed in position? Nothing is actually 'sliding down' On Jan 7, 8:58 pm, Wacko Jacko jackson.be...@gmail.com wrote: Hi All, Quite new to jQuery so would very much appreciate your help. http://www.punklogic.com.au/contact-punk-logic.htmifyouclickonthe tab in the header called 'PunkLogicelsewhere' you will notice I have used the toggle command to view a div in the header. Problem is, the elements ul li etc inside that div do not toggle with the main div. I would like all of the elements inside this div to follow the same motion, not just appear once the toggle is finished. Any suggestions would be greatly appreciated. Regards, Jacksonwww.punklogic.com.au
[jQuery] Re: Toggle child elements
Anyone? Am a barking up the wrong tree? On Jan 12, 10:48 am, Wacko Jacko jackson.be...@gmail.com wrote: Hi donb, It sounds like you know much more than I do. I am still quite new to jQuery. Can you point me in the right direction to have these elements slide in (down)? Thanks in advance for your help. Jackson On Jan 8, 2:01 pm, donb falconwatc...@comcast.net wrote: Ddoesn't the animation actually consist of an expanding div - meaning, the contents (and the outermost div) are fixed in position? Nothing is actually 'sliding down' On Jan 7, 8:58 pm, Wacko Jacko jackson.be...@gmail.com wrote: Hi All, Quite new to jQuery so would very much appreciate your help. http://www.punklogic.com.au/contact-punk-logic.htmifyouclick on the tab in the header called 'PunkLogicelsewhere' you will notice I have used the toggle command to view a div in the header. Problem is, the elements ul li etc inside that div do not toggle with the main div. I would like all of the elements inside this div to follow the same motion, not just appear once the toggle is finished. Any suggestions would be greatly appreciated. Regards, Jacksonwww.punklogic.com.au
[jQuery] Hide specific characters
Hi There, I am using a CMS product that does not enable me to hide cart totals from their cart summary. I need to do this for this particular client. Here a snippet of code for the rendered page: span id=catCartSummary quote=False vertical=Falsetable cellspacing=0 class=cartSummaryTabletrtd class=cartSummaryItem2 item(s), Total: $0.00 a class=cartSummaryLink href=/OrderRetrievev2.aspx? CatalogueID=34987View Cart/a/td/tr/table/span I would like to hide (or remove) from the exact following section: , Total: $0.00\ So everything from the 'comma', the word 'Total' and all other numbers and the $ sign. The 'View cart' I am already replacing with the following code: $(document).ready(function() { $(.cartSummaryLink).html(View enquiry list); }); Thanks in advance for your help.
[jQuery] Re: Toggle child elements
Hi donb, It sounds like you know much more than I do. I am still quite new to jQuery. Can you point me in the right direction to have these elements slide in (down)? Thanks in advance for your help. Jackson On Jan 8, 2:01 pm, donb falconwatc...@comcast.net wrote: Ddoesn't the animation actually consist of an expanding div - meaning, the contents (and the outermost div) are fixed in position? Nothing is actually 'sliding down' On Jan 7, 8:58 pm, Wacko Jacko jackson.be...@gmail.com wrote: Hi All, Quite new to jQuery so would very much appreciate your help. http://www.punklogic.com.au/contact-punk-logic.htmifyou click on the tab in the header called 'PunkLogic elsewhere' you will notice I have used the toggle command to view a div in the header. Problem is, the elements ul li etc inside that div do not toggle with the main div. I would like all of the elements inside this div to follow the same motion, not just appear once the toggle is finished. Any suggestions would be greatly appreciated. Regards, Jacksonwww.punklogic.com.au
[jQuery] Toggle child elements
Hi All, Quite new to jQuery so would very much appreciate your help. http://www.punklogic.com.au/contact-punk-logic.htm if you click on the tab in the header called 'PunkLogic elsewhere' you will notice I have used the toggle command to view a div in the header. Problem is, the elements ul li etc inside that div do not toggle with the main div. I would like all of the elements inside this div to follow the same motion, not just appear once the toggle is finished. Any suggestions would be greatly appreciated. Regards, Jackson www.punklogic.com.au