Thanks. Your example of core-collapse helped me figure out how to use 
multiple core-collapses without IDs.
Now the tricky part I still don't understand is how do we use core-ajax 
inside the core-collapse?
I want core-ajax to only fire when I click the Plus sign to expand the 
core-collapse. Then it does an ajax call and displays the results inside 
the clicked core-collapse. How do I do this without specifying IDs so it 
works when there are potentially thousands of core-collapses on the page?

I was trying to add the polymer core-ajax demo code to my code and this is 
as far as I got:
http://jsbin.com/gemepa/2/edit?html,output


On Friday, February 20, 2015 at 4:08:05 PM UTC-6, Rob Dodson wrote:
>
> here's a quick and dirty example: http://jsbin.com/fepozi/2/edit
>
> On Thu, Feb 19, 2015 at 7:09 AM, Jeremy Odekirk <[email protected] 
> <javascript:>> wrote:
>
>> Thanks, I would love to do this with as little JavaScript as possible 
>> since that is the main reason I am trying to convert my web app to using 
>> Polymer. Is there any code example that would explain how to do this?  How 
>> would I turn the whole thing into its own element so the plus symbol always 
>> is paired with one core-collapse and it knows exactly who to open?
>>
>> On Wednesday, February 18, 2015 at 10:18:57 AM UTC-6, Rob Dodson wrote:
>>>
>>> Depending on how you set things up, you could listen for the anchor 
>>> clicks and then use JavaScript to find the nearest core-collapse, or turn 
>>> the whole thing into its own element so the plus symbol always is paired 
>>> with one core-collapse and it knows exactly who to open.
>>>
>>> On Tue, Feb 17, 2015 at 2:19 PM, Jeremy Odekirk <[email protected]> 
>>> wrote:
>>>
>>>> The demo of core-collapse is too simplistic. How do you use 
>>>> core-collapse without specifying a unique id?
>>>>
>>>> I have an auto binding template that gets a list of documents returned 
>>>> by core-ajax. After it returns the list I want to have the option of 
>>>> expanding any of the items by clicking a plus icon or using core-collapse.
>>>>
>>>> How do you use core-collapse to expand the current clicked row of data 
>>>> without specifying an id?
>>>>
>>>> When the item is clicked, I want to run core-ajax to get the insides of 
>>>> the item and then display them.
>>>>
>>>>  Follow Polymer on Google+: plus.google.com/107187849809354688692
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Polymer" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/polymer-dev/a62d706b-cdb6-4028-bf32-f81f4f9d4515%
>>>> 40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/polymer-dev/a62d706b-cdb6-4028-bf32-f81f4f9d4515%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  Follow Polymer on Google+: plus.google.com/107187849809354688692
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Polymer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/polymer-dev/1cca052f-7a17-41df-8564-8e2930976b2a%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/polymer-dev/1cca052f-7a17-41df-8564-8e2930976b2a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/5f85056d-ab0d-40b5-9b30-a4cb8797e9aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to