That helps. Think you're right in that I need to get my objects and strings straight.
I am using cloud-carousel on my webpage for a slideshow. The carousel takes the 'alt' attribute from the slideshow image and passes it to the page for a description. I can put any div 'id' name I want in that parameter and the alt data will pass through fine. I don't know carousel code well enough to pass data separately from the carousel code itself.
I have 3-4 different pieces of data (firstname, date, description, city, etc.) that I want to pass to different div tags on my page to better describe the slideshow pic being viewed. I am doing this by loading up the alt attribute of the original image with some php array data; neatly delimited.
<img ...alt="<?php echo $ph01 . "|-|" . $ph01... ;?>" ... />
I can run the code and get all the pieces of data in the one div tag to show up. But I am not having any luck with a .split() or other means to separate the data into separate variables/objects based on my delimiters which could then be inserted into other divs.
I need to take the content of the $('#alt-text') div and manipulate it as a string. Then, take the resulting array data and put that back into different div tags on the page as appropriate. (Ideally, the $('#alt-text') would be a variable to start with and I could then work on it directly but I don't know how to get that..)
I should have started with this detail, sorry. The crux of my problem is not being able to get and manipulate the contents of the $('#alt-text') to begin with.
Once I can get it to a var I can work on it like this:
var xxx = ?????;
/* split up alt attribute string to get the caption data */
var getDet = xxx.split("|-|");
var descDetail = getDet;
var dateDetail = getDet;
var fnameDetail = getDet;