I look on the Internet, but I do not find anything useful .:(
I have a problem that I do not understand. I am sure that I am doing something wrong, but I do not know the jQuery syntax very well to understand what I am not doing right.
I use animations with JS and CSS 3, and I am having problems with the white space between words, and to solve these problems I need to find a way to replace the characters inside the line of text with something else. As an empty space with help, or as a test that I tried to do n"s xxxxx".
What I think I am doing is:
- when loading page
- Change the line of any paragraph with a class
.fancy-titlethat contains " n" with text " xxxxx"
So:
$(document).ready(function(){
for(i=0; i< myLength+1; i++){
var charCheck = $(".fancy-title").text()[i];
if(charCheck == "n"){
charCheck.replace("n", "xxxxxxxx");
}
}
});
But I get an error message:
charCheck.replace ("n", "xxxxxxxx"); this is not a function
I am using jquery
and other jquery-based scripts for creating animation, rotation, and scaling ... and they are all in HEAD with jquery loading.
What am I doing wrong? Manipulation in jQuery needs a specific .js extension? I realized that this is due to the basic features of jQuery, and looking at other examples, everything creates the same error for me.
I even tried
if(charCheck == "n"){
$(".fancy-title").text()[i] == " "
}
But just a modification does not apply on the page. I tried with innerHTML:( I feel so incompetent ...
Thanks in advance for any help.