Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: syntax error when pasting code

  1. #11
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Many thanks,
    Ive now deleted it and fine.

    I will play with speed etc.

    On a side note do you have any advice for this please.

    <li><img src="images/thumbs/188.jpg" data-large="images/fulls/188.jpg" data-description="Coffee table foot stool £90 H 40cm W 123cm D 43cm" /></a></li>

    Currently shows as Coffee table foot stool £90 H 40cm W 123cm D 43cm

    But i need it like so,

    Coffee table foot stool £90
    H 40cm W 123cm D 43cm

  2. #12
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,497
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If that's with the same page and script, you can just put the <br> right in there, but you have to change this in the script:

    Code:
    					if( title )
    						$rgGallery.find('div.rg-caption').show().children('p').empty().text( title )
    to:

    Code:
    					if( title )
    						$rgGallery.find('div.rg-caption').show().children('p').empty().html( title )
    But I'd caution against that. It looks fine to me the way it is, and having a br in there might throw the layout off.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    theremotedr (02-11-2018)

  4. #13
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Thanks,
    I changed it from .text to .html and then added the <br> but i then just see the <br> with the code without breaking.

    The reason i required it on two lines was on mobiles etc the text would continue to the right then drop to a second line.
    But depending on what the text was you would see something like this.

    Coffee table foot stool £90H 40cm W 1
    23cm D 43cm

    Hence why i wanted to make a break after the £90 etc.

    This would apply to all the items items.
    Do you have anything up your sleeve which would add a break for just mobile etc,obviously pc is fine.

    Doing it by width etc wont work as you then need to specify a fixed amount.
    Where this might be perfect,

    Coffee table £90
    H W D etc etc

    This wouldnt.
    Lovely double pine wardrobe £125
    H W D

    Reason being character count etc
    Hence why a break after the price.

    thanks

  5. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,497
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm looking at the script, it hasn't been changed. With the .text() you get the literal text. With .html() you get the html code as html.
    Last edited by jscheuer1; 02-11-2018 at 07:46 PM. Reason: typo
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    theremotedr (02-11-2018)

  7. #15
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    wait.
    Its now working for me

  8. #16
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Chrome went asleep for a while

  9. #17
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Hi,
    Jscheuer1
    Can you take a look & advise her please http://www.dynamicdrive.com/forums/s...561#post323561

    Thanks for your time.

  10. #18
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    All sorted no thanks

  11. #19
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,497
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by theremotedr View Post
    All sorted no thanks
    Well, I do like to give other folks a chance to contribute. And, if I tried answering everything myself, I might go nuts. Glad you got your answer.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  12. #20
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Thanks for the follow up.

Similar Threads

  1. Resolved Parse error: syntax error unexpected 'echo'
    By Kage Kazumi in forum PHP
    Replies: 3
    Last Post: 10-21-2012, 08:19 PM
  2. Replies: 1
    Last Post: 01-28-2011, 03:39 AM
  3. Parse error: syntax error, unexpected $end
    By heavensgate15 in forum PHP
    Replies: 2
    Last Post: 02-24-2010, 06:38 AM
  4. Replies: 2
    Last Post: 02-12-2010, 09:53 AM
  5. Replies: 1
    Last Post: 04-26-2008, 11:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •