JavaScript Append generated text
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Append generated text

Hybrid View

  1. #1
    Join Date
    Feb 2014
    Posts
    1

    Append generated text

    Hi, I'm just trying to add a headline to this block of text (since it's the headline, the style needs to be different):
    Code:
    gTranslate.append("g")
            .attr("class", "map-chatter")
    	    .attr("background-color", "#ffffff")
            .attr("transform", "translate(-160,-160)")
          .selectAll("text")
            .data([
              "This online course is designed for an interdisciplinary group of advanced health care ",
              "practitioners (nurses, physicians, pharmacists, dentists, researchers, administrators, ",
              "faculty) to prepare them to become leaders in the critical assessment, use and development ",
              "of information, and communication technologies (ICT) within diverse practice settings. This ",
              "course will focus on healthcare informatics and ICT system solutions to improve patient ",
              "care and health care delivery systems. The aim is for students to gain the knowledge, skills, ",
              "and attitudes to support evidence-based care at a leadership level. Students will learn ",
    	  "healthcare informatics concepts and theories, and eHealth competencies, to address the ",
              "information and communication technology needs for providers and consumers of today's ",
              "complex health care organizations. ",
            ])
          .enter().append("text")
            .attr("dy", function(d, i) { return i * 1.4 + "em"; })
            .text(function(d) { return d; });
    
      });
    Thank you in advance.

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,870

    Re: Append generated text

    Clearly you are using a framework and not just straight JavaScript to accomplish this.

    • What is the HTML setting/code before your desired alteration?
    • Is there a reason you are using a framework for a simple text append?
    • Are you actually appending text or trying to add a description below another item?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center