SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: jQuery issue

  1. #1
    runat="server" Golgotha's Avatar
    Join Date
    Nov 2001
    Location
    Colorado
    Posts
    2,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery issue

    Code JavaScript:
    $('<a>', {
                    class: 'prev page-numbers',
                    href: '#',
                    text: '&laquo;',
                    click: function () {
                        alert(this.text);
                    } 
                });

    Unfortunately, the text displays as &laquo; not <<
    it automatically converts & to &amp; and I don't want it to...
    thoughts?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Have you considered using the actual characters?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    runat="server" Golgotha's Avatar
    Join Date
    Nov 2001
    Location
    Colorado
    Posts
    2,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have but, << does not display the same as &laquo;

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Golgotha View Post
    I have but, << does not display the same as &laquo;
    Make new html file.
    Put &laquo; in it.
    View html page in browser.
    copy paste.


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
  •