Is 'sparkline' a method?

0 votes

I've got the following code 

<script language="javascript" type="text/javascript" src="/js/jquery.js"></script> 
<script language="javascript" type="text/javascript" src="/js/jquery.sparkline.js"></script> 

<script type="text/javascript"> 
$(function() {
    alert($('.test').html());
    $('.test').sparkline();
});
</script>

This is the HTML code:

<span class="test">1,2,3</span>

I get the alert, which shows 1,2,3, but the error console (in Chrome) says Uncaught TypeError: Object #<an Object> has no method 'sparkline'. Have I overlooked something?

Nov 9, 2018 in Apache Spark by Neha
• 6,280 points
51 views

1 answer to this question.

0 votes

I suggest you to check 2 things

  1. That jquery.sparkline.js is actually present in your /js/ folder.
  2. That you're not including jQuery again further down the page, which would effectively remove any plugins you included before it (since it redefines $/jQuery)
answered Nov 9, 2018 by Frankie
• 9,810 points

Related Questions In Apache Spark

0 votes
1 answer

What is a Parquet file in Spark?

Hey, Parquet is a columnar format file supported ...READ MORE

answered Jul 2 in Apache Spark by Gitika
• 25,340 points
37 views
0 votes
1 answer

Error: value textfile is not a member of org.apache.spark.SparkContext

Hi, Regarding this error, you just need to change ...READ MORE

answered Jul 4 in Apache Spark by Gitika
• 25,340 points
113 views
0 votes
1 answer

Error : split value is not a member of org.apache.spark.sql.Row

spark.read.csv is used when loading into a ...READ MORE

answered Jul 10 in Apache Spark by Rishi
156 views
0 votes
1 answer

Error : split value is not a member of org.apache.spark.sql.Row

spark.read.csv is used when loading into a ...READ MORE

answered Jul 22 in Apache Spark by Firoz
182 views
0 votes
1 answer

What do we exactly mean by “Hadoop” – the definition of Hadoop?

The official definition of Apache Hadoop given ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by Shubham
186 views
+1 vote
1 answer
0 votes
3 answers

Can we run Spark without using Hadoop?

No, you can run spark without hadoop. ...READ MORE

answered May 7 in Big Data Hadoop by pradeep
163 views
0 votes
1 answer

Joining Multiple Spark Dataframes

You can run the below code to ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by Bharani
• 4,550 points
389 views
0 votes
1 answer

What is Executor Memory in a Spark application?

Every spark application has same fixed heap ...READ MORE

answered Jan 4 in Apache Spark by Frankie
• 9,810 points
317 views
0 votes
1 answer

How to get ID of a map task in Spark?

you can access task information using TaskContext: import org.apache.spark.TaskContext sc.parallelize(Seq[Int](), ...READ MORE

answered Nov 20, 2018 in Apache Spark by Frankie
• 9,810 points
326 views